Classes | |
struct | _OS_FILE_UNIQUE_ID |
Typedefs | |
typedef _OS_FILE_UNIQUE_ID | OS_FILE_UNIQUE_ID |
typedef UINT64 | OS_PROCESS_WAITABLE_PROCESS |
Enumerations | |
enum | OS_FILE_OPEN_TYPE { OS_FILE_OPEN_TYPE_READ = (1<<0), OS_FILE_OPEN_TYPE_WRITE = (1<<1), OS_FILE_OPEN_TYPE_EXECUTE = (1<<2), OS_FILE_OPEN_TYPE_APPEND = (1<<3), OS_FILE_OPEN_TYPE_TRUNCATE = (1<<4), OS_FILE_OPEN_TYPE_CREATE = (1<<5), OS_FILE_OPEN_TYPE_CREATE_EXCL = (1<<6), OS_FILE_OPEN_TYPE_DELETE = (1<<7), OS_FILE_OPEN_TYPE_CLOSE_ON_EXEC = (1<<8) } |
enum | OS_FILE_PERMISSION_TYPE { OS_FILE_PERMISSION_TYPE_READ = (1<<0), OS_FILE_PERMISSION_TYPE_WRITE = (1<<1), OS_FILE_PERMISSION_TYPE_EXECUTE = (1<<2) } |
enum | OS_FILE_SEEK_TYPE { OS_FILE_SEEK_SET = 0, OS_FILE_SEEK_CUR = (1<<0), OS_FILE_SEEK_END = (1<<1) } |
enum | OS_FILE_ATTRIBUTES { OS_FILE_ATTRIBUTES_NONE = 0, OS_FILE_ATTRIBUTES_EXIST = (1<<0), OS_FILE_ATTRIBUTES_REGULAR = (1<<1), OS_FILE_ATTRIBUTES_DIRECTORY = (1<<2), OS_FILE_ATTRIBUTES_SYMLINK = (1<<3) } |
enum | OS_PIPE_CREATE_FLAGS { OS_PIPE_CREATE_FLAGS_NONE = 0, OS_PIPE_CREATE_FLAGS_READ_SIDE_INHERITABLE = (1<<0), OS_PIPE_CREATE_FLAGS_WRITE_SIDE_INHERITABLE = (1<<1) } |
Functions | |
OS_RETURN_CODE | OS_OpenFD (const CHAR *path, INT flags, INT mode, NATIVE_FD *fd) |
OS_RETURN_CODE | OS_WriteFD (NATIVE_FD fd, const VOID *buffer, USIZE *count) |
OS_RETURN_CODE | OS_ReadFD (NATIVE_FD fd, USIZE *count, VOID *buffer) |
OS_RETURN_CODE | OS_SeekFD (NATIVE_FD fd, INT whence, INT64 *offset) |
OS_RETURN_CODE | OS_CloseFD (NATIVE_FD fd) |
OS_RETURN_CODE | OS_DeleteFile (const CHAR *name) |
OS_RETURN_CODE | OS_FlushFD (NATIVE_FD fd) |
OS_RETURN_CODE | OS_GetFDAttributes (NATIVE_FD fd, OS_FILE_ATTRIBUTES *attr) |
OS_RETURN_CODE | OS_FilePermissionsFD (NATIVE_FD fd, OS_FILE_PERMISSION_TYPE *permissions) |
OS_RETURN_CODE | OS_FileSizeFD (NATIVE_FD fd, USIZE *size) |
OS_RETURN_CODE | OS_Cwd (CHAR *cwd, INT len) |
OS_RETURN_CODE | OS_Chdir (const CHAR *dir, CHAR *cwd, INT len) |
OS_RETURN_CODE | OS_OpenDirFD (const CHAR *name, NATIVE_FD *fd) |
OS_RETURN_CODE | OS_MkDir (const CHAR *name, INT mode) |
OS_RETURN_CODE | OS_DeleteDirectory (const CHAR *name) |
OS_RETURN_CODE | OS_IsConsoleFD (NATIVE_FD fd, INT *isConsole) |
OS_RETURN_CODE | OS_ReadDirectoryFD (NATIVE_FD fd, USIZE *count, VOID *buffer) |
OS_RETURN_CODE | OS_GetFDAccessMode (NATIVE_FD fd, OS_FILE_OPEN_TYPE *mode) |
OS_RETURN_CODE | OS_ReadLink (const CHAR *path, CHAR *buf, USIZE *size) |
OS_RETURN_CODE | OS_GetFileAttributes (const CHAR *path, OS_FILE_ATTRIBUTES *attr) |
OS_RETURN_CODE | OS_RenameFile (const CHAR *oldPath, const CHAR *newPath) |
OS_RETURN_CODE | OS_FileUniqueID (NATIVE_FD fd, OS_FILE_UNIQUE_ID *uniqueId) |
OS_RETURN_CODE | OS_DuplicateFD (NATIVE_FD fd, BOOL_T dupCloseOnExec, NATIVE_FD *outFd) |
OS_RETURN_CODE | OS_Ftruncate (NATIVE_FD fd, INT64 length) |
void | OS_ReportFileOpen (NATIVE_FD fd) |
void | OS_ReportFileClose (NATIVE_FD fd) |
NATIVE_FD | OS_GetLowestFileDescriptorToUse () |
void | OS_RelocateAndReportFileOpen (NATIVE_FD *fd) |
BOOL_T | OS_WasFileReportedOpen (NATIVE_FD fd) |
|
Machine unique ID for file |
|
Opaque object that represents a process that we can wait for its termination |
|
File permission modes |
|
File open modes |
|
File permission modes |
|
File seek modes |
|
Pipes creation flags |
|
Sets a new current directory. Optionally records the previous directory.
|
|
Closes fd and removes references to it from the process.
|
|
Retrieves size in bytes of fd.
|
|
Deletes a directory.
|
|
Delete a file by name
|
|
Creates a copy of a file descriptor using the lowest available free file descriptor. This function considers the value returned from OS_GetLowestFileDescriptorToUse() when duplicating the descriptor.
|
|
Retrieve the current permissions for the specified file.
|
|
Retrieves size in bytes of fd.
|
|
Get unique ID for an opened file, identified by a file descriptor. Two opened file descriptors for the same physical file are guaranteed to have the same unique ID.
|
|
Flush the object referenced by the descriptor fd.
|
|
Truncates a file referenced by fd to a size of length bytes. If the original file size is bigger than length, the extra data is lost. If the original file size is smaller than length,the file extended.
|
|
Get the permissions type requested when fd was opened. This is useful to check whether we can read or write fd.
|
|
Query fd's file attributes
|
|
Query file attributes of the file denoted by path
|
|
Getter function to retrieve the lowest value of file descriptor that OS-APIs should use. OS-APIs will attempt to only use file descriptors which are larger or equal to the value that this function returns. This function is implemented as a weak reference symbol so libraries linked with OS-APIs may provide their own implementation of this function and return a different value.
|
|
Check whether a file descriptor is the application's console. A file descriptor is the application's console if: 1. The file of the underlying descriptor is a terminal device. 2. The terminal device is the tty master (or console) of the current application. The practical implication of a console file descriptor is that every write operation to it needs to be flushed right away because the user on the other side expects to see output immediately.
|
|
Creates a directory.
|
|
Opens a directory for browsing.
|
|
The file name specified by path is opened for reading and/or writing, as specified by the argument flags.
|
|
Attempts to read count bytes of data from the directory referenced by the descriptor fd to the buffer pointed to by buffer. A console file descriptor usually needs to be flushed after every read/write operation.
|
|
Attempts to read count bytes of data from the object referenced by the descriptor fd to the buffer pointed to by buffer.
|
|
Reads the symbolic link pointed by path. Returns the path that the symlink points to.
|
|
Relocate the file descriptor to the range permitted according to OS_GetLowestFileDescriptorToUse(), then record a file descriptor as opened by OS-APIs. Later, we allow to query whether a certain file descriptor was opened by OS-APIs or not.
|
|
Renamed the file oldPath to newPath
|
|
Record that a file descriptor opened by OS-APIs is not longer valid, and it is closed. Later, we allow to query whether a certain file descriptor was opened by OS-APIs or not.
|
|
Record a file descriptor as opened by OS-APIs. Later, we allow to query whether a certain file descriptor was opened by OS-APIs or not.
|
|
Reposition the offset of the file descriptor fd to the an offset in, the file denoted by offset. The offset is measured with relation to a starting point determined by the directive whence.
|
|
Queries whether a certain file descriptor was opened by OS-APIs or not.
|
|
Attempts to write count bytes of data to the object referenced by the descriptor fd from the buffer pointed to by buffer.
|