Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNamedPipe ¶
Types ¶
type FileInfo ¶
type FileInfo struct { *Listing Fs afero.Fs `json:"-"` Path string `json:"path"` Name string `json:"name"` Size int64 `json:"size"` Extension string `json:"extension"` ModTime time.Time `json:"modified"` Mode os.FileMode `json:"mode"` IsDir bool `json:"isDir"` Type string `json:"type"` Subtitles []string `json:"subtitles,omitempty"` Content string `json:"content,omitempty"` Checksums map[string]string `json:"checksums,omitempty"` DiskUsage uint64 `json:"diskUsage"` DiskTotal uint64 `json:"diskTotal"` }
FileInfo describes a file.
func NewFileInfo ¶
func NewFileInfo(opts FileOptions) (*FileInfo, error)
NewFileInfo creates a File object from a path and a given user. This File object will be automatically filled depending on if it is a directory or a file. If it's a video file, it will also detect any subtitles.
type FileOptions ¶
type FileOptions struct { Fs afero.Fs Path string Modify bool Expand bool ReadHeader bool Checker rules.Checker }
FileOptions are the options when getting a file info.
Click to show internal directories.
Click to hide internal directories.