Documentation ¶
Index ¶
- Constants
- type Path
- func (p *Path) BaseName() string
- func (p *Path) CopyFile(src, dst string) (err error)
- func (p *Path) CreateDirIfNotExist(dirname string) error
- func (p *Path) FileExists(filename string) bool
- func (p *Path) FileExtension(filename string) string
- func (p *Path) FileMode(filename string) (os.FileMode, error)
- func (p *Path) FileSize(filename string) (int64, error)
- func (p *Path) FormatPath() string
- func (p *Path) GetFileMd5(filename string) string
- func (p *Path) GetFilenameNoExtension(filename string) string
- func (p *Path) GetPath() string
- func (p *Path) GetRawPath() string
- func (p *Path) IsDir(dirname string) (bool, error)
- func (p *Path) IsExist(name string) (bool, error)
- func (p *Path) ListAll() []string
- func (p *Path) ListFiles() []string
- func (p *Path) ListFilesAll() []string
- func (p *Path) ListFilesRecursive(prefix string, pa string, b bool) []string
- func (p *Path) ListFilesType(ext string) []string
- func (p *Path) ListFolders() []string
- func (p *Path) ListFoldersAll() []string
- func (p *Path) MkDir(dirname string) error
- func (p *Path) MkDirSpecificMode(dirname string, mode os.FileMode) error
- func (p *Path) ModTime() (time.Time, error)
- func (p *Path) ParentPath() string
- func (p *Path) RelativePath(filename string) string
- func (p *Path) RemoveFileIfExist(filename string) error
- func (p *Path) Run(cmd string, shell bool) (string, error)
- func (p *Path) SearchFile(filename string) (fullpath string, err error)
- func (p *Path) SplitPath() []string
- func (p *Path) TempDir() string
- func (p *Path) UpdatePath(path string)
Constants ¶
View Source
const ( SLASH = string(os.PathSeparator) DEFAULT_DIR_ACCESS = 0755 )
View Source
const ( All = iota Files Folders )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
func (*Path) CreateDirIfNotExist ¶
func (*Path) FileExists ¶
func (*Path) FileExtension ¶
func (*Path) FormatPath ¶
func (*Path) GetFileMd5 ¶
func (*Path) GetFilenameNoExtension ¶
func (*Path) GetRawPath ¶
func (*Path) ListFilesAll ¶
func (*Path) ListFilesRecursive ¶
func (*Path) ListFilesType ¶
func (*Path) ListFolders ¶
func (*Path) ListFoldersAll ¶
func (*Path) MkDirSpecificMode ¶
func (*Path) ParentPath ¶
func (*Path) RelativePath ¶
func (*Path) RemoveFileIfExist ¶
func (*Path) SearchFile ¶
SearchFile Search a file in paths. this is often used in search config file in /etc ~/
func (*Path) UpdatePath ¶
Click to show internal directories.
Click to hide internal directories.