file

package
v1.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpAccessTime

func CmpAccessTime(f1, f2 *File) int

func CmpBlockSize

func CmpBlockSize(f1, f2 *File) int

func CmpCreationTime

func CmpCreationTime(f1, f2 *File) int

func CmpDir

func CmpDir(f1, f2 *File) int

func CmpExt

func CmpExt(f1, f2 *File) int

func CmpModificationTime

func CmpModificationTime(f1, f2 *File) int

func CmpName

func CmpName(f1, f2 *File) int

func CmpNatural

func CmpNatural(f1, f2 *File) int

func CmpSize

func CmpSize(f1, f2 *File) int

Types

type CmpFunc

type CmpFunc func(*File, *File) int

func CmpAll

func CmpAll(args ...CmpFunc) CmpFunc

func ReverseCmp

func ReverseCmp(cb CmpFunc) CmpFunc

type File

type File struct {
	// contains filtered or unexported fields
}

func New

func New(dirname, name string) (f *File, err error)

func NewFromInfo

func NewFromInfo(info os.FileInfo, dirname string) *File

func (*File) AbsolutePath

func (f *File) AbsolutePath() string

func (*File) AbsoluteSplit added in v1.4.3

func (f *File) AbsoluteSplit() (dirname, name string)

func (*File) AccessTime

func (f *File) AccessTime() time.Time

func (*File) AddChildren added in v1.4.0

func (f *File) AddChildren(children ...*File)

func (*File) BlockSize

func (f *File) BlockSize() int64

func (*File) Children

func (f *File) Children() FileList

func (*File) CreationTime

func (f *File) CreationTime() time.Time

func (*File) DirName

func (f *File) DirName() string

func (*File) DirSize added in v1.4.4

func (f *File) DirSize() (size int64)

func (*File) Extension

func (f *File) Extension() string

func (*File) Flatten

func (f *File) Flatten(only_dirs ...bool) (fl FileList)

func (*File) Group

func (f *File) Group() string

func (*File) GroupID

func (f *File) GroupID() string

func (*File) HasMode

func (f *File) HasMode(mask os.FileMode) bool

func (*File) IsCharDevice

func (f *File) IsCharDevice() bool

func (*File) IsDevice

func (f *File) IsDevice() bool

func (*File) IsDir

func (f *File) IsDir() bool

func (*File) IsGid

func (f *File) IsGid() bool

func (*File) IsIrregular

func (f *File) IsIrregular() bool

func (*File) IsPipe

func (f *File) IsPipe() bool

func (*File) IsRegular

func (f *File) IsRegular() bool

func (*File) IsSocket

func (f *File) IsSocket() bool

func (*File) IsSticky

func (f *File) IsSticky() bool
func (f *File) IsSymlink() bool

func (*File) IsUid

func (f *File) IsUid() bool

func (*File) LinkPath

func (f *File) LinkPath() string

func (*File) Mode

func (f *File) Mode() os.FileMode

func (*File) ModificationTime

func (f *File) ModificationTime() time.Time

func (*File) Name

func (f *File) Name() string

func (*File) Owner

func (f *File) Owner() string

func (*File) OwnerID

func (f *File) OwnerID() string

func (*File) Parent added in v1.3.1

func (f *File) Parent() *File

func (*File) Path

func (f *File) Path() string

func (*File) SearchChildren

func (f *File) SearchChildren(deepness int, searchOptions ...bool) (children FileList)

func (*File) SearchParent added in v1.3.1

func (f *File) SearchParent() *File

func (*File) SetParent added in v1.4.0

func (f *File) SetParent(p *File, both ...bool)

func (*File) Size

func (f *File) Size() int64

func (*File) Split added in v1.4.3

func (f *File) Split() (dirname, name string)

type FileList

type FileList []*File

func (*FileList) Add

func (fl *FileList) Add(files ...*File)

func (FileList) Sort

func (fl FileList) Sort(cb CmpFunc) FileList

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL