Documentation ¶
Index ¶
- func CreateDirIfNecessary(path string) error
- func CreateFileIfNessary(filepath string) (*os.File, error)
- func GetCurrentDirectory() string
- func GetFileContent(filePath string) (string, error)
- func GetGrandpaDir(path string) (string, error)
- func IsDir(path string) bool
- func IsExist(filepath string) bool
- func MMapRead(filePath string) ([]byte, error)
- func String2File(content, fileName string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirIfNecessary ¶
CreateDirIfNecessary create directory if not exist,pay attention to fix permission and it will create any necessary parents If path is already a exist, it does nothing and returns nil.
func CreateFileIfNessary ¶
CreateFileIfNessary create file if not exist,pay attention to fix permission If file is already a exist, it does nothing and returns nil.
func GetCurrentDirectory ¶
func GetCurrentDirectory() string
GetCurrentDirectory get current programmer execute directory
func GetFileContent ¶
GetFileContent get all file content once
func GetGrandpaDir ¶
GetGrandpaDir get grandpa base dir of given filepath path must be file path not dir return grandpa dir path,if there no grandpa it will return empty string and error
func String2File ¶
String2File write string content to fileName
Types ¶
This section is empty.