Documentation
¶
Index ¶
Constants ¶
View Source
const ( Regular fileType = "REGULAR" Directory fileType = "DIR" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// public fields
Id string `json:"id"` // a logical (non-universally-unique) identifier
FileType fileType `json:"fileType"` // the file type
Base string `json:"base"` // the base name
Reason *matcher.Pattern `json:"reason"` // object describing the reason the file was included/excluded, or null if no pattern matched it
Files []*File `json:"files"` // an array of objects of the same type for each file within the directory.
IsDir bool `json:"isDir"` // true if the file is a directory
IsRegular bool `json:"isFile"` // true if the file is a regular file
ModifiedDatetime string `json:"modifiedDatetime"` // the last modified datetime
Rel string `json:"rel"` // the relative path to the project root, which is used as the identifier
RelDir string `json:"relDir"` // the relative path of the directory containing the file
Size int64 `json:"size"` // nullable; length in bytes for regular files; system-dependent
FileCount int64 `json:"fileCount"` // total number of files in the subtree rooted at this node
Abs string `json:"abs"` // the absolute path
AllIncluded bool `json:"allIncluded"` // Are all nodes under this one included?
AllExcluded bool `json:"allExcluded"` // Are all nodes under this one excluded?
}
func CreateFile ¶
func CreateFile(root util.AbsolutePath, path util.AbsolutePath, match *matcher.Pattern) (*File, error)
func (*File) CalculateDirectorySizes ¶ added in v1.1.6
func (f *File) CalculateDirectorySizes()
func (*File) CalculateInclusions ¶ added in v1.1.6
func (f *File) CalculateInclusions()
type FilesService ¶
type FilesService interface {
GetFile(path util.AbsolutePath, matchList matcher.MatchList) (*File, error)
}
func CreateFilesService ¶
func CreateFilesService(base util.AbsolutePath, log logging.Logger) FilesService
Click to show internal directories.
Click to hide internal directories.