Documentation ¶
Index ¶
Constants ¶
View Source
const PtrSize = 4
Variables ¶
This section is empty.
Functions ¶
func OpenFileFlags ¶
func OpenFileFlags(df Lookupflag, of Oflag, fd Fdflag, rights Rights) int
Types ¶
type Errno ¶
type Errno = int32
const ( ErrnoSuccess Errno = iota // No error occurred. System call completed successfully. Errno2big // Argument list too long. ErrnoAcces // Permission denied. ErrnoAddrinuse // Address in use. ErrnoAddrnotavail // Address not available. ErrnoAfnosupport // Address family not supported. ErrnoAgain // Resource unavailable, or operation would block. ErrnoAlready // Connection already in progress. ErrnoBadf // Bad file descriptor. ErrnoBadmsg // Bad message. ErrnoBusy // Device or resource busy. ErrnoCanceled // Operation canceled. ErrnoChild // No child processes. ErrnoConnaborted // Connection aborted. ErrnoConnrefused // Connection refused. ErrnoConnreset // Connection reset. ErrnoDeadlk // Resource deadlock would occur. ErrnoDestaddrreq // Destination address required. ErrnoDom // Mathematics argument out of domain of function. ErrnoDquot // Reserved. ErrnoExist // File exists. ErrnoFault // Bad address. ErrnoFbig // File too large. ErrnoHostunreach // Host is unreachable. ErrnoIdrm // Identifier removed. ErrnoIlseq // Illegal byte sequence. ErrnoInprogress // Operation in progress. ErrnoIntr // Interrupted function. ErrnoInval // Invalid argument. ErrnoIo // I/O error. ErrnoIsconn // Socket is connected. ErrnoIsdir // Is a directory. ErrnoLoop // Too many levels of symbolic links. ErrnoMfile // File descriptor value too large. ErrnoMlink // Too many links. ErrnoMsgsize // Message too large. ErrnoMultihop // Reserved. ErrnoNametoolong // Filename too long. ErrnoNetdown // Network is down. ErrnoNetreset // Connection aborted by network. ErrnoNetunreach // Network unreachable. ErrnoNfile // Too many files open in system. ErrnoNobufs // No buffer space available. ErrnoNodev // No such device. ErrnoNoent // No such file or directory. ErrnoNoexec // Executable file format error. ErrnoNolck // No locks available. ErrnoNolink // Reserved. ErrnoNomem // Not enough space. ErrnoNomsg // No message of the desired type. ErrnoNoprotoopt // Protocol not available. ErrnoNospc // No space left on device. ErrnoNosys // Function not supported. ErrnoNotconn // The socket is not connected. ErrnoNotdir // Not a directory or a symbolic link to a directory. ErrnoNotempty // Directory not empty. ErrnoNotrecoverable // State not recoverable. ErrnoNotsock // Not a socket. ErrnoNotsup // Not supported, or operation not supported on socket. ErrnoNotty // Inappropriate I/O control operation. ErrnoNxio // No such device or address. ErrnoOverflow // Value too large to be stored in data type. ErrnoOwnerdead // Previous owner died. ErrnoPerm // Operation not permitted. ErrnoPipe // Broken pipe. ErrnoProto // Protocol error. ErrnoProtonosupport // Protocol not supported. ErrnoPrototype // Protocol wrong type for socket. ErrnoRange // Result too large. ErrnoRofs // Read-only file system. ErrnoSpipe // Invalid seek. ErrnoSrch // No such process. ErrnoStale // Reserved. ErrnoTimedout // Connection timed out. ErrnoTxtbsy // Text file busy. ErrnoXdev // Cross-device link. ErrnoNotcapable // Extension: Capabilities insufficient. )
type Fdflag ¶
type Fdflag = uint16
const ( // Append mode: Data written to the file is always appended to the file's end. FdflagAppend Fdflag = 1 << iota // Write according to synchronized I/O data integrity completion. Only the data stored in the file is synchronized. FdflagDSync // Non-blocking mode. FdflagNonBlock // Synchronized read I/O operations. FdflagRSync // Write according to synchronized I/O file integrity completion. In addition to synchronizing the data stored in the file, the implementation may also synchronously update the file's metadata. FdflagSync )
type Filestat ¶
type Filestat struct { // Device ID of device containing the file. Dev uint64 // File serial number. Ino uint64 // File type. Filetype Filetype // Number of hard links to the file. Nlink uint64 // For regular files, the file size in bytes. For symbolic links, the length in bytes of the pathname contained in the symbolic link. Size uint64 // Last data access timestamp. Atim uint64 // Last data modification timestamp. Mtim uint64 // Last file status change timestamp. Ctim uint64 }
type Filetype ¶
type Filetype = uint8
const ( // The type of a file descriptor or file is unknown or is different from any of the other types specified. FiletypeUnknown Filetype = 0 // The file descriptor or file refers to a block device inode. FiletypeBlockDevice Filetype = 1 // The file descriptor or file refers to a character device inode. FiletypeCharacterDevice Filetype = 2 // The file descriptor or file refers to a directory inode. FiletypeDirectory Filetype = 3 // The file descriptor or file refers to a regular file inode. FiletypeRegularFile Filetype = 4 // The file descriptor or file refers to a datagram socket. FiletypeSocketDgram Filetype = 5 // The file descriptor or file refers to a byte-stream socket. FiletypeSocketStream Filetype = 6 // The file refers to a symbolic link inode. FiletypeSymbolicLink Filetype = 7 )
type PrestatDir ¶
type Rights ¶
type Rights = uint64
const ( RightFdDatasync Rights = (1 << 0) RightFdRead Rights = (1 << 1) RightFdSeek Rights = (1 << 2) RightFdFdstatSetFlags Rights = (1 << 3) RightFdSync Rights = (1 << 4) RightFdTell Rights = (1 << 5) RightFdWrite Rights = (1 << 6) RightFdAdvise Rights = (1 << 7) RightFdAllocate Rights = (1 << 8) RightPathCreateDirectory Rights = (1 << 9) RightPathCreateFile Rights = (1 << 10) RightPathLinkSource Rights = (1 << 11) RightPathLinkTarget Rights = (1 << 12) RightPathOpen Rights = (1 << 13) RightFdReaddir Rights = (1 << 14) RightPathReadlink Rights = (1 << 15) RightPathRenameSource Rights = (1 << 16) RightPathRenameTarget Rights = (1 << 17) RightPathFilestatGet Rights = (1 << 18) RightPathFilestatSetSize Rights = (1 << 19) RightPathFilestatSetTimes Rights = (1 << 20) RightFdFilestatGet Rights = (1 << 21) RightFdFilestatSetSize Rights = (1 << 22) RightFdFilestatSetTimes Rights = (1 << 23) RightPathSymlink Rights = (1 << 24) RightPathRemoveDirectory Rights = (1 << 25) RightPathUnlinkFile Rights = (1 << 26) RightPollFdReadwrite Rights = (1 << 27) RightSockShutdown Rights = (1 << 28) RightSockAccept Rights = (1 << 29) )
Click to show internal directories.
Click to hide internal directories.