Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FileInfoColumns = Result{ Columns: []Column{ {"name", "base name of the file"}, {"size", "length in bytes for regular files; system-dependent for others"}, {"size_humanized", "human friendly representation of the filesize"}, {"mode", "file mode bits as a string"}, {"mode_int", "file mode bits as a number"}, {"mod_time", "modification time"}, {"is_dir", "true if path is a directory"}, }, }
FileInfoColumns are columns for use by file info utilities
Functions ¶
Types ¶
type FileInfo ¶
type FileInfo struct { // base name of the file Name string `json:"name"` // length in bytes for regular files; system-dependent for others Size int `json:"size"` // human friendly representation of the filesize SizeHumanized string `json:"size_humanized"` // file mode bits as a string Mode string `json:"mode"` // file mode bits as a number ModeInt int `json:"mode_int"` // modification time ModTime time.Time `json:"mod_time"` // abbreviation for Mode().IsDir() IsDir bool `json:"is_dir"` }
FileInfo is a struct for (un)marshalling os.FileInfo
func NewFileInfo ¶
Click to show internal directories.
Click to hide internal directories.