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

Method Stat

texteditor/buffer.go:260–265  ·  view source on GitHub ↗

Stat gets info about the file, including the highlighting language.

()

Source from the content-addressed store, hash-verified

258
259// Stat gets info about the file, including the highlighting language.
260func (tb *Buffer) Stat() error {
261 tb.fileModOK = false
262 err := tb.Info.InitFile(string(tb.Filename))
263 tb.ConfigKnown() // may have gotten file type info even if not existing
264 return err
265}
266
267// ConfigKnown configures options based on the supported language info in parse.
268// Returns true if supported.

Callers 15

InitMethod · 0.95
SetFilenameMethod · 0.95
RevertMethod · 0.95
saveFileMethod · 0.95
AddExternalFileMethod · 0.45
UpdateFontsAvailMethod · 0.45
FilesFromPathsFunction · 0.45
CheckUpdateMethod · 0.45
ReadMethod · 0.45
lockFileMethod · 0.45
needToReloadMethod · 0.45
ParseDirImplMethod · 0.45

Calls 2

ConfigKnownMethod · 0.95
InitFileMethod · 0.80

Tested by 1

checkResourcesFunction · 0.36