Documentation ¶
Index ¶
- type Type
- func (t Type) IsCharDevice() bool
- func (t Type) IsDevice() bool
- func (t Type) IsDir() bool
- func (t Type) IsExisting() bool
- func (t Type) IsIrregular() bool
- func (t Type) IsNotExisting() bool
- func (t Type) IsPipe() bool
- func (t Type) IsRegularFile() bool
- func (t Type) IsSocket() bool
- func (t Type) IsSymlink() bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Type ¶
type Type struct {
// contains filtered or unexported fields
}
func GetType ¶
GetType checks the filepath and returns struct that contains the result of checking. If os.Lstat returns non-nil error, GetType returns it.
func (Type) IsCharDevice ¶
IsCharDevice returns true if it's a character device file. IsDevice returns true when IsCharDevice returns true. This is based on io/fs.FileMode.
func (Type) IsDevice ¶
IsDevice returns true if it's a device file despite whether it's a block device or character device. This is based on io/fs.FileMode.
func (Type) IsExisting ¶
IsExisting returns true on existing path despite whether it is a regular file, directory or special file. This is based on os.Stat.
func (Type) IsIrregular ¶
IsIrregular returns true if it's non-regular file; nothing else is known about this file (see pkg.go.dev/io/fs#FileMode). This is based on io/fs.FileMode.
func (Type) IsNotExisting ¶
IsNotExisting returns NOT of IsExisting.
func (Type) IsRegularFile ¶
IsRegularFile returns true if it's a regular file (not a directory and a special file.) If it's a special file like device, pipe, symlink, socket, etc, this returns false. This is based on io/fs.FileMode.