Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MkdirIfNotExist ¶
MkdirIfNotExist *
- @Description: path if not exist then create this path (dir)
- @param path
- @return error
func PathExistOrNot ¶
PathExistOrNot *
- @Description: path or file exist or not
- @param path
- @return bool
- @return error
Example ¶
fPath := "./test.txt" b, err := PathExistOrNot(fPath) if err != nil { println(err) } if b { println("file path is exist") }
Output:
Types ¶
type Compressor ¶
type Compressor interface { Compress(output string, files ...*os.File) error UnCompress(zipFile, output string) error }
func NewCompressor ¶
func NewCompressor(compressType CompressType) Compressor
NewCompressor *
- @Description:
- @param compressType
- @return Compressor
type ZipCompress ¶
type ZipCompress struct {
Type CompressType
}
ZipCompress "Zip Compress"
func (*ZipCompress) Compress ¶
func (c *ZipCompress) Compress(output string, files ...*os.File) error
Compress *
- @Description:
- @receiver c
- @param output
- @param files
- @return error
func (*ZipCompress) UnCompress ¶
func (c *ZipCompress) UnCompress(zipFile, output string) error
UnCompress *
- @Description:
- @receiver c
- @param zipFile
- @param output
- @return error
Click to show internal directories.
Click to hide internal directories.