file

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogicalDrives

func GetLogicalDrives() []string

GetLogicalDrives returns available device drives in the system.

func IsPathDirectory

func IsPathDirectory(path string) bool

IsPathDirectory indicates if path is a valid directory.

func QueryDosDevice

func QueryDosDevice(drive string) (string, error)

QueryDosDevice translates the DOS device name to hard disk drive letter.

Types

type AttributeData

type AttributeData struct {
	// FileAttributes represents the file attributes.
	FileAttributes uint32
	// CreationTime specifies when a file or directory is created. If the underlying file system does not support creation time, this member is zero.
	CreationTime syscall.Filetime
	// LastAccessTime for a file, the structure specifies the last time that a file is read from or written to.
	// For a directory, the structure specifies when the directory is created. For both files and directories,
	// the specified date is correct, but the time of day is always set to midnight. If the underlying file
	// system does not support the last access time, this member is zero (0).
	LastAccessTime syscall.Filetime
	// LastWriteTime for a file, the structure specifies the last time that a file is written to. For a directory,
	// the structure specifies when the directory is created. If the underlying file system does not support the last write time,
	// this member is zero (0).
	LastWriteTime syscall.Filetime
	// FileSizeHigh high-order part of the file size.
	FileSizeHigh uint32
	// FileSizeLow low-order part of the file size.
	FileSizeLow uint32
}

AttributeData contains meta information about a file.

type DevInfo

type DevInfo struct {
	// Type designates the type of underlying device.
	Type uint32
	// Characteristics represents device characteristics.
	Characteristcs uint32
}

DevInfo provides file system device information about the type of device object associated with a file object.

func QueryVolumeInfo

func QueryVolumeInfo(fd uintptr) (*DevInfo, error)

QueryVolumeInfo obtains device information for the specified file handle.

Jump to

Keyboard shortcuts

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