use alloc::string::String;
use bitflags::bitflags;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FileType {
File,
Dir,
}
#[derive(Debug, Clone)]
pub struct Metadata {
pub file_type: FileType,
pub size: u32,
pub name: String,
}
#[derive(Debug, Clone)]
pub struct DirEntry {
pub name: String,
pub file_type: FileType,
pub size: u32,
}
bitflags! {
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct OpenFlags: u32 {
const READ = 0x1;
const WRITE = 0x2;
const CREATE = 0x100;
const EXCL = 0x200;
const TRUNC = 0x400;
const APPEND = 0x800;
}
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SeekFrom {
Start(u32),
Current(i32),
End(i32),
}