Documentation ¶
Index ¶
- Variables
- type File
- func (f File) AccTime() time.Time
- func (f File) Blocks() int64
- func (f File) Children() []File
- func (f File) ClassifiedName() string
- func (f File) CrtTime() time.Time
- func (f File) DirSize() int64
- func (f File) Fd() int
- func (f File) FollowLink() (File, error)
- func (f File) FullName() string
- func (f File) Group() *user.Group
- func (f File) Inode() uint64
- func (f File) IsAppend() bool
- func (f File) IsDevice() bool
- func (f File) IsDir() bool
- func (f File) IsDotfile() bool
- func (f File) IsExclusive() bool
- func (f File) IsNamedPipe() bool
- func (f File) IsRegular() bool
- func (f File) IsSocket() bool
- func (f File) IsSymlink() bool
- func (f File) IsTemporary() bool
- func (f File) Links() uint64
- func (f File) ModTime() time.Time
- func (f File) Mode() os.FileMode
- func (f File) Name() string
- func (f File) Size() int64
- func (f File) Sys() interface{}
- func (f File) User() *user.User
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotSymlink is returned when the method expects a symbolic link, // but the file is not. ErrNotSymlink = errors.New("the file is not a symbolic link") )
Functions ¶
This section is empty.
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
File represents a file.
func (File) ClassifiedName ¶
ClassifiedName returns the name with an appended type indicator.
func (File) DirSize ¶
DirSize return the length in bytes for all files inside the directory, recursively.
func (File) FollowLink ¶
FollowLink returns the file that the symbolic link points to. If the file is not a symbolic link, it returns `ErrNotSymlink`.
func (File) IsExclusive ¶
IsExclusive reports whether `f` describes an exclusive-use file.
func (File) IsNamedPipe ¶
IsNamedPipe reports whether `f` describes a named pipe (FIFO).
func (File) IsRegular ¶
IsRegular reports whether `f` describes a regular file. That is, it tests that no mode type bits are set.
func (File) IsTemporary ¶
IsTemporary reports whether `f` describes a temporary file (not backed up).
Click to show internal directories.
Click to hide internal directories.