vfs clean (#38)

Co-authored-by: hosted-fornet <hosted-fornet@protonmail.com>
This commit is contained in:
bitful-pannul 2023-11-02 15:19:45 +00:00 committed by GitHub
parent 13fecc3919
commit dfa4088669
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 425 additions and 489 deletions

View File

@ -589,6 +589,7 @@ pub enum VfsAction {
full_path: String,
offset: u64,
},
Append(String),
SetSize {
full_path: String,
size: u64,
@ -635,20 +636,28 @@ pub enum VfsResponse {
#[derive(Debug, Serialize, Deserialize)]
pub enum VfsError {
BadJson,
BadPayload,
BadDriveName,
BadDescriptor,
NoCap,
EntryNotFound,
PersistError,
InternalError, // String
}
#[allow(dead_code)]
impl VfsError {
pub fn kind(&self) -> &str {
match *self {
VfsError::BadJson => "BadJson",
VfsError::BadPayload => "BadPayload",
VfsError::BadDriveName => "BadDriveName",
VfsError::BadDescriptor => "BadDescriptor",
VfsError::NoCap => "NoCap",
VfsError::EntryNotFound => "EntryNotFound",
VfsError::PersistError => "PersistError",
VfsError::InternalError => "InternalError",
}
}
}

File diff suppressed because it is too large Load Diff