|
XenevaOS
|
#include <Fs\vfs.h>#include <Fs\Fat\Fat.h>#include <Mm\pmmngr.h>#include <Mm\vmmngr.h>#include <Mm\kmalloc.h>#include <process.h>#include <Hal\x86_64_sched.h>#include <Hal\serial.h>#include <aucon.h>#include <_null.h>#include <Hal\x86_64_hal.h>#include <Fs\pipe.h>
Functions | |
| int | OpenFile (char *filename, int mode) |
| OpenFile – opens a file for user process. | |
| int | FileSetOffset (int fd, size_t offset) |
| FileSetOffset – set a offset inorder to read the specific position of the file. | |
| size_t | ReadFile (int fd, void *buffer, size_t length) |
| ReadFile – reads a file into given buffer. | |
| size_t | WriteFile (int fd, void *buffer, size_t length) |
| WriteFile – write system call. | |
| int | CreateDir (char *filename) |
| CreateDir – creates a directory. | |
| int | RemoveFile (char *pathname) |
| RemoveFile – remove a directory or file. | |
| int | CloseFile (int fd) |
| CloseFile – closes a general file. | |
| int | FileIoControl (int fd, int code, void *arg) |
| FileIoControl – controls the file through I/O code. | |
| int | FileStat (int fd, void *buf) |
| FileStat – writes information related to file. | |
| int | OpenDir (char *filename) |
| OpenDir – opens a directory. | |
| int | ReadDir (int dirfd, void *dirent) |
| ReadDir – reads a directory entry. | |
| int | ProcessGetFileDesc (const char *filename) |
| ProcessGetFileDesc – Searches all process file descriptor entries for specific filename fd. | |
| int CloseFile | ( | int | fd | ) |
CloseFile – closes a general file.
| fd | – file descriptor to close |
| int CreateDir | ( | char * | filename | ) |
CreateDir – creates a directory.
| filename | – name of the directory |
| int FileIoControl | ( | int | fd, |
| int | code, | ||
| void * | arg | ||
| ) |
FileIoControl – controls the file through I/O code.
| fd | – file descriptor |
| code | – code to pass |
| arg | – argument to pass |
| int FileSetOffset | ( | int | fd, |
| size_t | offset | ||
| ) |
FileSetOffset – set a offset inorder to read the specific position of the file.
| fd | – File descriptor |
| offset | – offset in bytes |
| int FileStat | ( | int | fd, |
| void * | buf | ||
| ) |
FileStat – writes information related to file.
| fd | – file descriptor |
| buf | – Pointer to file structure |
| int OpenDir | ( | char * | filename | ) |
OpenDir – opens a directory.
| filename | – name of the directory |
| int OpenFile | ( | char * | filename, |
| int | mode | ||
| ) |
OpenFile – opens a file for user process.
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| int ProcessGetFileDesc | ( | const char * | filename | ) |
ProcessGetFileDesc – Searches all process file descriptor entries for specific filename fd.
| int ReadDir | ( | int | dirfd, |
| void * | dirent | ||
| ) |
ReadDir – reads a directory entry.
| dirfd | – directory file descriptor |
| dirent | – aurora directory entry struct |
ReadFile – reads a file into given buffer.
| fd | – file descriptor |
| buffer | – buffer where to put the data |
| length | – length in bytes |
| int RemoveFile | ( | char * | pathname | ) |
RemoveFile – remove a directory or file.
| dirname | – directory name |