XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions
_kefile.h File Reference
#include <_xeneva.h>
#include <stdint.h>
Include dependency graph for _kefile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _GUID
 
struct  _disk_info_
 
struct  _disk_partition_info_
 
struct  _XEFileStatus_
 
struct  _XEFileControl_
 
struct  _XEDirectoryEnty_
 

Macros

#define FILE_OPEN_READ_ONLY   (1<<1)
 
#define FILE_OPEN_WRITE   (1<<2)
 
#define FILE_OPEN_CREAT   (1<<3)
 
#define FILE_DIRECTORY   (1<<1)
 
#define FILE_GENERAL   (1<<2)
 
#define FILE_DEVICE   (1<<3)
 
#define FILE_DELETED   (1<<4)
 
#define FILE_INVALID   (1<<5)
 
#define FILE_FILE_SYSTEM   (1<<6)
 
#define FILE_PIPE   (1<<7)
 
#define XENEVA_STDIN   0
 
#define XENEVA_STDOUT   1
 
#define XENEVA_STDERR   2
 
#define XE_MAX_STORAGE_DEVICE   26
 
#define XE_MAX_PARTITION   128
 

Typedefs

typedef struct _GUID GUID
 
typedef struct _disk_info_ XEVDiskInfo
 
typedef struct _disk_partition_info_ XEVDiskPartitionInfo
 
typedef struct _XEFileStatus_ XEFileStatus
 
typedef struct _XEFileControl_ XEFileIOControl
 
typedef struct _XEDirectoryEnty_ XEDirectoryEntry
 

Functions

XE_LIB int _KeOpenFile (char *pathname, int mode)
 
XE_LIB size_t _KeReadFile (int fd, void *buffer, size_t length)
 
XE_LIB size_t _KeWriteFile (int fd, void *buffer, size_t length)
 
XE_LIB int _KeCreateDir (char *filename)
 
XE_LIB int _KeRemoveFile (char *pathname)
 
XE_LIB int _KeCloseFile (int fd)
 
XE_LIB int _KeFileIoControl (int fd, int code, void *arg)
 
XE_LIB int _KeFileStat (int fd, void *buf)
 
XE_LIB int _KeOpenDir (char *filename)
 
XE_LIB int _KeReadDir (int dirfd, void *dirent)
 
XE_LIB int _KeFileSetOffset (int fd, size_t offset)
 
XE_LIB int _KeCreatePipe (char *name, size_t sz)
 
XE_LIB int _KeGetStorageDiskInfo (uint8_t diskID, void *buffer)
 
XE_LIB int _KeGetStoragePartitionInfo (uint8_t diskID, uint8_t partitionID, void *buffer)
 

Detailed Description

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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.

Macro Definition Documentation

◆ FILE_DELETED

#define FILE_DELETED   (1<<4)

◆ FILE_DEVICE

#define FILE_DEVICE   (1<<3)

◆ FILE_DIRECTORY

#define FILE_DIRECTORY   (1<<1)

◆ FILE_FILE_SYSTEM

#define FILE_FILE_SYSTEM   (1<<6)

◆ FILE_GENERAL

#define FILE_GENERAL   (1<<2)

◆ FILE_INVALID

#define FILE_INVALID   (1<<5)

◆ FILE_OPEN_CREAT

#define FILE_OPEN_CREAT   (1<<3)

◆ FILE_OPEN_READ_ONLY

#define FILE_OPEN_READ_ONLY   (1<<1)

◆ FILE_OPEN_WRITE

#define FILE_OPEN_WRITE   (1<<2)

◆ FILE_PIPE

#define FILE_PIPE   (1<<7)

◆ XE_MAX_PARTITION

#define XE_MAX_PARTITION   128

◆ XE_MAX_STORAGE_DEVICE

#define XE_MAX_STORAGE_DEVICE   26

◆ XENEVA_STDERR

#define XENEVA_STDERR   2

◆ XENEVA_STDIN

#define XENEVA_STDIN   0

◆ XENEVA_STDOUT

#define XENEVA_STDOUT   1

Typedef Documentation

◆ GUID

typedef struct _GUID GUID

◆ XEDirectoryEntry

◆ XEFileIOControl

◆ XEFileStatus

typedef struct _XEFileStatus_ XEFileStatus

◆ XEVDiskInfo

typedef struct _disk_info_ XEVDiskInfo

◆ XEVDiskPartitionInfo

Function Documentation

◆ _KeCloseFile()

XE_LIB int _KeCloseFile ( int  fd)

◆ _KeCreateDir()

XE_LIB int _KeCreateDir ( char *  filename)

◆ _KeCreatePipe()

XE_LIB int _KeCreatePipe ( char *  name,
size_t  sz 
)

◆ _KeFileIoControl()

XE_LIB int _KeFileIoControl ( int  fd,
int  code,
void *  arg 
)

◆ _KeFileSetOffset()

XE_LIB int _KeFileSetOffset ( int  fd,
size_t  offset 
)

◆ _KeFileStat()

XE_LIB int _KeFileStat ( int  fd,
void *  buf 
)

◆ _KeGetStorageDiskInfo()

XE_LIB int _KeGetStorageDiskInfo ( uint8_t  diskID,
void *  buffer 
)

◆ _KeGetStoragePartitionInfo()

XE_LIB int _KeGetStoragePartitionInfo ( uint8_t  diskID,
uint8_t  partitionID,
void *  buffer 
)

◆ _KeOpenDir()

XE_LIB int _KeOpenDir ( char *  filename)

◆ _KeOpenFile()

XE_LIB int _KeOpenFile ( char *  pathname,
int  mode 
)

◆ _KeReadDir()

XE_LIB int _KeReadDir ( int  dirfd,
void *  dirent 
)

◆ _KeReadFile()

XE_LIB size_t _KeReadFile ( int  fd,
void *  buffer,
size_t  length 
)

◆ _KeRemoveFile()

XE_LIB int _KeRemoveFile ( char *  pathname)

◆ _KeWriteFile()

XE_LIB size_t _KeWriteFile ( int  fd,
void *  buffer,
size_t  length 
)