Documentation ¶
Overview ¶
A group of functions about file system and native api
Index ¶
- Constants
- func Dirname(path string) string
- func EnvDef(env, def string) string
- func ExpandAbs(path string) string
- func ExpandHome(path string) string
- func GetDefaultReleaseDir() []string
- func GoPath() (dir string, ok bool)
- func Home() string
- func HomeDir() (path string, ok bool)
- func IsAndroid() bool
- func IsDarwin() bool
- func IsDir(fname string) bool
- func IsDirOrNotExist(dir string) bool
- func IsExist(fname string) bool
- func IsFile(fname string) bool
- func IsFileOrNotExist(fname string) bool
- func IsFreebsd() bool
- func IsLinux() bool
- func IsModifiedAfter(fname string, fn func()) bool
- func IsRelative(path string) bool
- func IsRoot(path string) bool
- func IsSolaris() bool
- func IsSymlink(fname string) bool
- func IsWinRoot(path string) bool
- func IsWindows() bool
- func LastDir(path string) (string, error)
- func OS() string
- func Platform() string
- func ProgramDir() (string, error)
- func REGIST_SIGNAL_HANDLER(handler func(os.Signal), signals ...os.Signal)
- func RemoveExt(path string) string
- func ReplaceExt(path, ext string) string
- func ScanDir(name string, callback func(path string, isdir bool))
- func SearchFromSpecified(name string, users ...string) (path string, ok bool)
- func TruncSeek(fd *os.File)
- type FStat
Constants ¶
const ( FilePerm = 0644 DirPerm = 0755 )
const ( LINUX = "linux" WINDOWS = "windows" DARWIN = "darwin" FREEBSD = "freebsd" SOLARIS = "solaris" ANDROID = "android" UNKNOWN = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func GetDefaultReleaseDir ¶
func GetDefaultReleaseDir() []string
Get default folder names of released executables
func IsDirOrNotExist ¶
IsDirOrNotExist check whether given is a directory or not exist
func IsFileOrNotExist ¶
IsFileOrNotExist check whether given name is a file or not exist
func IsModifiedAfter ¶
IsModifiedAfter check whether or not file is modified by the function
func IsRelative ¶
IsRelative check whether a path is relative In these condition: path is empty, start with '[.~][/\]', '/', "[a-z]:\"
func LastDir ¶
LastDir return last dir of path, if path is dir, return itself else return path's contain dir name
func REGIST_SIGNAL_HANDLER ¶
a simple signal notifier
func ReplaceExt ¶
func SearchFromSpecified ¶
Search file from user's dir if users, or search from GetDefaultReleaseDir Always used for find executable programs from specified folders of me!!!