Drop ids, staged writes and publish from the filesystem contract

This commit is contained in:
Danny Kim
2026-09-25 12:40:17 +09:00
parent 95a2b1a086
commit e3adbf0462
4 changed files with 11 additions and 39 deletions
-12
View File
@@ -36,7 +36,6 @@ fn text(setting: Option<&Setting>) -> Option<String> {
fn route(target: &Locator) -> Result<String, ErrorCode> {
match target {
Locator::Path(path) => Ok(path.clone()),
Locator::Id(_) => Err(ErrorCode::InvalidInput),
}
}
@@ -141,7 +140,6 @@ impl GuestWriter for FtpWriter {
kind: EntryKind::File,
size: 0,
revision: None,
id: None,
}))
}
}
@@ -192,8 +190,6 @@ impl Guest for Ftp {
// promised without simulating one, which the contract forbids.
conditional_write: false,
watch: false,
staged_write: false,
publishable: false,
virtual_directories: false,
})
}
@@ -216,7 +212,6 @@ impl Guest for Ftp {
kind: EntryKind::Directory,
size: 0,
revision: None,
id: None,
});
}
with_control(|control| {
@@ -231,7 +226,6 @@ impl Guest for Ftp {
kind: EntryKind::File,
size,
revision: None,
id: None,
});
}
let (code, _) = control.send(&format!("CWD {path}"))?;
@@ -240,7 +234,6 @@ impl Guest for Ftp {
kind: EntryKind::Directory,
size: 0,
revision: None,
id: None,
})
})
}
@@ -309,7 +302,6 @@ impl Guest for Ftp {
kind: EntryKind::Directory,
size: 0,
revision: None,
id: None,
})
}
@@ -342,10 +334,6 @@ impl Guest for Ftp {
fn poll(_cursor: Option<String>) -> Result<ChangePage, ErrorCode> {
Err(ErrorCode::Unsupported)
}
fn publish() -> Result<Option<String>, ErrorCode> {
Err(ErrorCode::Unsupported)
}
}
memona_plugin_sdk::export!(Ftp);
-1
View File
@@ -35,7 +35,6 @@ pub fn machine_entry(line: &str) -> Option<Entry> {
kind,
size,
revision: None,
id: None,
},
})
}