Documentation ¶
Index ¶
- Variables
- func GetHomeDir() (string, error)
- func GetModifiedTime(path string) (time.Time, error)
- func GetNameAndExtension(filename string) (string, string)
- func HasFileBeenModified(inFile string, recentThresholdInDays time.Duration) bool
- func IsDirectory(path string) (bool, error)
- func IsExist(inFile string) bool
- func IsNotExist(inFile string) bool
- func NewStore(config *Config) (unistore.Store, error)
- func ReadLineByLine(inFile string, fnProcessLine func(line string, linenumber int) error) error
- func SaveContent(outputFile string, content []byte) error
- type Config
- type Store
- func (store *Store) Delete(inPath string) error
- func (store *Store) DoesPathExist(inPath string) bool
- func (store *Store) GetData(inPath string) ([]byte, error)
- func (store *Store) GetModifiedTime(inPath string) (time.Time, error)
- func (store *Store) ListItems(basePath *string, filter filter.Filter) ([]string, error)
- func (store *Store) PutData(path string, data []byte) error
- func (store *Store) Validate() error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoDirectory = errors.New("Directory does not exist ")
)
Functions ¶
func GetHomeDir ¶
GetHomeDir retrieves the home dir of current user
func GetModifiedTime ¶
GetModifiedTime returns the modified time for the given path
func GetNameAndExtension ¶
GetNameAndExtension retrieves the name and extension of a given file
func HasFileBeenModified ¶
HasFileBeenModified returns true if the file mtime is within recentThresholdInDays. false, otherwise.
func IsDirectory ¶
IsDirectory checks if file is directory or otherwise
func IsNotExist ¶
IsNotExist checks if inFile does not exist or otherwise
func ReadLineByLine ¶
ReadLineByLine reads from a given file, line by line
func SaveContent ¶
SaveContent saves the content to a given file
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) DoesPathExist ¶
func (*Store) GetModifiedTime ¶
Click to show internal directories.
Click to hide internal directories.