MCPcopy Create free account
hub / github.com/cogentcore/core / OpenFS

Method OpenFS

tensor/table/io.go:120–127  ·  view source on GitHub ↗

OpenFS is the version of [Table.OpenCSV] that uses an [fs.FS] filesystem.

(fsys fs.FS, filename string, delim Delims)

Source from the content-addressed store, hash-verified

118
119// OpenFS is the version of [Table.OpenCSV] that uses an [fs.FS] filesystem.
120func (dt *Table) OpenFS(fsys fs.FS, filename string, delim Delims) error {
121 fp, err := fsys.Open(filename)
122 if err != nil {
123 return errors.Log(err)
124 }
125 defer fp.Close()
126 return dt.ReadCSV(bufio.NewReader(fp), delim)
127}
128
129// OpenCSV reads a table idx view from a comma-separated-values (CSV) file
130// (where comma = any delimiter, specified in the delim arg),

Callers 4

mainFunction · 0.95
mainFunction · 0.95
OpenFSMethod · 0.45
AnalyzePlanetsFunction · 0.45

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls 4

ReadCSVMethod · 0.95
LogFunction · 0.92
OpenMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected