Documentation ¶
Index ¶
- Constants
- func All(dir string, opts ...walkOption) (paths []string, err error)
- func ContentType(path string) (contentType string, err error)
- func ContentTypeForFile(file *os.File) (contentType string, err error)
- func Copy(from string, to string, opts ...copyOption) (err error)
- func Create(path string, opts ...option) (err error)
- func Delete(filename string) error
- func Dir() *optionType
- func Exists(path string, opts ...existsOption) (final string, exists bool)
- func Ext(ext string, others ...string) *optionExt
- func File() *optionType
- func Filename(path string, opts ...nameOption) (filename string)
- func Is(path string, opts ...isOption) (is bool, err error)
- func Matchable(matchable matchable) *optionMatchable
- func Mode(mode os.FileMode) *optionMode
- func NewExistsOptions(opts ...existsOption) []existsOption
- func NewFilename(original string) (new string)
- func NewOwner(uid int, gid int) *owner
- func Path(path string, others ...string) *optionPath
- func Pattern(pattern string) *optionPattern
- func Rename(from string, to string) error
- func Type(_type _type) *optionType
- func ValidFilename(filename string) bool
- func ValidFilepath(filepath string) bool
- func WriteMode(mode writeMode) *optionWriteMode
- type Size
Constants ¶
View Source
const ( CheckTypeAll checkType = 1 CheckTypeAny checkType = 2 )
View Source
const ( // TypeFile 文件 TypeFile _type = 1 // TypeDir 目录 TypeDir _type = 2 )
View Source
const ( // WriteModeSkip 跳过 WriteModeSkip writeMode = 1 // WriteModeOverride 覆盖 WriteModeOverride writeMode = 2 // WriteModeError 返回错误 WriteModeError writeMode = 3 // WriteModeRename 重命名 WriteModeRename writeMode = 4 )
Variables ¶
This section is empty.
Functions ¶
func ContentType ¶
ContentType 获得文件的类型
func ContentTypeForFile ¶
ContentTypeForFile 获得文件的类型
func NewExistsOptions ¶ added in v0.0.4
func NewExistsOptions(opts ...existsOption) []existsOption
NewExistsOptions 快捷方式,解决接口不对外暴露不能引用的问题
Types ¶
Source Files ¶
- check_type.go
- const.go
- content.go
- copy.go
- copy_option.go
- error.go
- exists.go
- exists_option.go
- file.go
- is_option.go
- matchable.go
- name.go
- name_option.go
- option.go
- option_ext.go
- option_matchable.go
- option_mode.go
- option_path.go
- option_pattern.go
- option_type.go
- option_write_mode.go
- owner.go
- size.go
- type.go
- valid.go
- walk.go
- walk_option.go
- write_mode.go
Click to show internal directories.
Click to hide internal directories.