Documentation ¶
Index ¶
- Variables
- func AsRealPath(l ...string) string
- func ChkFileErr(err error) error
- func Exists(filePath string) bool
- func Ext(srcPath string) string
- func Homify(p string) string
- func Join(dir, file, ext string) string
- func MakePath(path string) error
- func PathToFilename(p string) string
- func SetNumberedPath(n int, path string)
- func Split(src string) (dir, file, ext string)
- func TimeBasedFilename(t time.Time) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Err_NotExist = errors.New("File/dir doesn't exist") Err_Permission = errors.New("Permission Denied") Err_ReadOnly = errors.New("Read only file") Err_WriteOnly = errors.New("Write only file") Err_RangeError = errors.New("Range error") Err_IllegalFile = errors.New("Illegal file - bad data") Err_InvalidData = errors.New("Invalid data") )
Functions ¶
func AsRealPath ¶
return a real path for the given internal path
can pass a list of strings for joining; e.g. AsRealPath("fred", "barney", "wilma", "betty") and get "fred/barney/wilma/betty" -- with 'fred' allowed to have the meta path tokens above
func ChkFileErr ¶
func PathToFilename ¶
func SetNumberedPath ¶
set the numbered meta path for use with 'AsRealPath'
func Split ¶
returns dir, filename & ext for the given srcPath
e.g. /foo/bar/boo.ext -> "/foo/bar" "boo" & ".ext" NOTE: if there is no .extention, the 'file' may be the last dir in a path
func TimeBasedFilename ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.