|
| typedef struct _AuDirectoryEnty_ | AuDirectoryEntry |
| |
| typedef struct __VFS_NODE__ *(* | open_callback) (struct __VFS_NODE__ *node, char *path) |
| |
| typedef size_t(* | read_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file, uint64_t *buffer, uint32_t length) |
| |
| typedef size_t(* | read_block_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file, uint64_t *buffer) |
| |
| typedef size_t(* | write_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file, uint64_t *buffer, uint32_t length) |
| |
| typedef struct __VFS_NODE__ *(* | create_dir_callback) (struct __VFS_NODE__ *node, char *dirname) |
| |
| typedef struct __VFS_NODE__ *(* | create_file_callback) (struct __VFS_NODE__ *node, char *filename) |
| |
| typedef int(* | remove_dir_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file) |
| |
| typedef int(* | remove_file_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file) |
| |
| typedef int(* | close_callback) (struct __VFS_NODE__ *node, struct __VFS_NODE__ *file) |
| |
| typedef int(* | iocontrol_callback) (struct __VFS_NODE__ *file, int code, void *arg) |
| |
| typedef struct __VFS_NODE__ *(* | opendir_callback) (struct __VFS_NODE__ *fs, char *dirname) |
| |
| typedef int(* | readdir_callback) (struct __VFS_NODE__ *fs, struct __VFS_NODE__ *dir, AuDirectoryEntry *dirent) |
| |
| typedef size_t(* | fs_getblockfor) (struct __VFS_NODE__ *fs, struct __VFS_NODE__ *file, uint64_t offset) |
| |
| typedef struct __VFS_NODE__ | AuVFSNode |
| |
| typedef struct _AuFileStatus_ | AuFileStatus |
| |
| typedef struct _FileControl_ | AuFileIOControl |
| |
| typedef struct __VFS_Container__ | AuVFSContainer |
| | AuVFSContainer – is a container which contains list of nodes/directories another directory will point to another newly created container.
|
| |
|
| void | AuVFSInitialise () |
| | AuVFSInitialise – initialise the virtual file system.
|
| |
| AU_EXTERN AU_EXPORT AuVFSNode * | AuVFSOpen (char *path) |
| | AuVFSOpen – Opens a file.
|
| |
| AU_EXTERN AU_EXPORT int | AuVFSNodeIOControl (AuVFSNode *node, int code, void *arg) |
| | AuVFSNodeIOControl – Calls node's iocontrol pointer.
|
| |
| AU_EXTERN AU_EXPORT void | AuVFSAddFileSystem (AuVFSNode *node) |
| | AuVFSAddFileSystem – adds a file system to the vfs list.
|
| |
| AU_EXTERN AU_EXPORT void | AuVFSRegisterRoot (AuVFSNode *fs) |
| | AuVFSRegisterRoot – register the root file system.
|
| |
| AU_EXTERN AU_EXPORT AuVFSNode * | AuVFSFind (char *path) |
| | AuVFSFind – Searches a filesystem an return it to the caller.
|
| |
| AU_EXTERN AU_EXPORT size_t | AuVFSNodeRead (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer, uint32_t length) |
| | AuVFSNodeRead – read from file system.
|
| |
| AU_EXTERN AU_EXPORT size_t | AuVFSNodeReadBlock (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer) |
| | AuVFSNodeReadBlock – read a block size data from file system.
|
| |
| AU_EXTERN AU_EXPORT AuVFSNode * | AuVFSCreateDir (AuVFSNode *fsys, char *dirname) |
| | AuVFSCreateDir – creates a new dir.
|
| |
| AU_EXTERN AU_EXPORT AuVFSNode * | AuVFSCreateFile (AuVFSNode *fsys, char *filename) |
| | AuVFSCreateFile – create a new file.
|
| |
| int | AuVFSRemoveFile (AuVFSNode *fsys, AuVFSNode *file) |
| | AuVFSRemoveFile –remove a file from a file system.
|
| |
| int | AuVFSRemoveDir (AuVFSNode *fsys, AuVFSNode *file) |
| | AuVFSRemoveFile –remove a file from a file system.
|
| |
| AU_EXTERN AU_EXPORT void | AuVFSNodeWrite (AuVFSNode *node, AuVFSNode *file, uint64_t *buffer, uint32_t length) |
| | AuVFSNodeWrite – write to file system.
|
| |
| AU_EXTERN AU_EXPORT void | AuVFSNodeClose (AuVFSNode *node, AuVFSNode *file) |
| | AuVFSNodeClose – close a file system or file.
|
| |
| AU_EXTERN AU_EXPORT size_t | AuVFSGetBlockFor (AuVFSNode *node, AuVFSNode *file, uint64_t offset) |
| | AuVFSGetBlockFor – returns a block number for certain byte offset of file.
|
| |
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:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- 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.