1
0
Fork 0
forked from AbleOS/ableos
ableOS_v1Change/ableos/src/syscalls/file_calls.rs
2022-02-07 06:38:18 -06:00

44 lines
1.1 KiB
Rust

//! File system related system calls.
/// Temporary representation of a file path
pub type Path = *const u8;
/// Remove a Directory from the filesystem
///
/// # Arguments
/// * `full_path` - The full path of the directory to remove
/// * `force` - Whether to remove the directory even if it is not empty
#[no_mangle]
pub extern "C" fn remove_directory(path: Path, force_delete: bool) {
unimplemented!();
}
/// Create a new directory at the given path
///
/// # Arguments
/// * `full_path` - The full path of the directory to create
#[no_mangle]
pub extern "C" fn create_directory(path: Path) -> FSReturns {
unimplemented!();
}
#[repr(C)]
/// A return used by the file related system calls
pub enum FSReturns {
/// The system call was successful
Ok,
/// The directory can not be created
DirectoryCouldNotBeCreated,
/// The directory could not be removed
DirectoryCouldNotBeRemoved,
///
FileCouldNotBeCreated,
///
FileCouldNotBeRemoved,
/// The file could not be opened
FileCouldNotBeOpened,
///
FileCouldNotBeClosed,
}