Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFile ¶
DeleteFile deletes a regular file. If not found or any other occurs, error is returned.
func FileSize ¶ added in v0.0.9
FileSize returns size of a provided file. In case of an error the function returns -1 and logs the error.
func GetFileMtime ¶
GetFileMtime returns a file modification time
func IsDir ¶
IsDir tests whether a provided path represents a directory. If not or in case of an IO error, false is returned along with the error
func PathExists ¶ added in v0.0.9
PathExists tests whether the provided path exists no matter what it is (file, dir, ...)
Types ¶
type FileList ¶ added in v0.0.9
type FileList struct {
// contains filtered or unexported fields
}
FileList is an abstraction for list of files along with their modification time information. It supports sorting.
func ListDirsInDir ¶ added in v0.0.9
ListDirsInDir lists directories in a directory (without recursion).
func ListFilesInDir ¶ added in v0.0.9
ListFilesInDir lists files according to their modification time (newest first).