Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileSet ¶
func NewFileSet() *fileSet
Types ¶
type FileIfc ¶
type FileIfc interface {
// Our own accessors
GetPath() string // Original path as supplied
GetAbsPath() (*string, error) // Absolute path, eliminates relative and more
GetBasename() string // Path without file name
GetAbsBasename() (*string, error) // Absolute path without file name
Exists() bool // Check if this file already exists on disk
Create() error // Create the file if it doesn't already exist
Rename(newPath string) error // Rename (move) this file to a new path
Delete() error // Delete this file
CopyTo(path string) error // Copy this file to another location
ReadString() (*string, error) // Read the file, return content as a *string
ReadBytes() (*[]byte, error) // Read the file, return contents as a *[]byte
WriteString(content *string) error // Write the contents of a string to a file
WriteBytes(content *[]byte) error // Write the contents of a []byte to a file
// FileInfo accessors
GetName() (*string, error) // Name of the file without the path
GetSize() (*int64, error) // Size of the file as a count of bytes
GetMode() (*fs.FileMode, error) // File system "mode" (attributes)
GetModTime() (*time.Time, error) // Get the last modified timestamp
IsDir() (bool, error) // Check if this is a Dir (vs. regular File, etc)
GetSys() (any, error) // Get representation of data source (maybe nil!)
}
type FileSetIfc ¶
Click to show internal directories.
Click to hide internal directories.