Documentation ¶
Index ¶
- func AbsolutePath(path string) (string, error)
- func CreateDirIfDoesNotExist(path string) error
- func EmptyDir(path string) error
- func EmptyOrCreateDir(path string) error
- func GetMTime(path string) (mtime time.Time, err error)
- func IsDir(path string) bool
- func IsFile(path string) bool
- func RelativePath(basepath, path string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AbsolutePath ¶
AbsolutePath converts a path (relative or absolute) into an absolute one. Supports '~' notation for $HOME directory of the current user.
func CreateDirIfDoesNotExist ¶
CreateDirIfDoesNotExist creates a directory if the specified path does not exist
func EmptyDir ¶
EmptyDir removes all files and folders inside the specified path. It could be similar to RemoveAll() but without removing the folder itself.
func EmptyOrCreateDir ¶
EmptyOrCreateDir create a new folder or empty an existing one
func RelativePath ¶
RelativePath returns a path relative to the given base path. If the path is not under the given base path, the specified path is returned. So all returned paths are under the base path.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.