https://opendal.apache.org/ logo
Hey, I was looking at the capabilities of the memo...
# general
q
Hey, I was looking at the capabilities of the memory service after trying to use it for unit tests. It doesn't seem to support rename and copy, but I found an issue about adding those capabilities and a PR to match. Were these capabilities removed or were they implemented through an intermediary layer?
memory/backend.rs
Copy code
rs
fn copy(
    &self,
    _: &OperationContext,
    _: &str,
    _: &str,
    _: OpCopy,
    _: OpCopier,
) -> Result<Self::Copier> {
    Err(Error::new(
        ErrorKind::Unsupported,
        "operation is not supported",
    ))
}

async fn rename(
    &self,
    _: &OperationContext,
    _: &str,
    _: &str,
    _: OpRename,
) -> Result<RpRename> {
    Err(Error::new(
        ErrorKind::Unsupported,
        "operation is not supported",
    ))
}
The service's native capabilities also don't include
rename
or
copy
Copy code
rs
let capability = Capability {
    read: true,
    read_with_suffix: true,
    write: true,
    write_can_empty: true,
    write_with_cache_control: true,
    write_with_content_type: true,
    write_with_content_disposition: true,
    write_with_content_encoding: true,
    write_with_if_not_exists: true,
    delete: true,
    stat: true,
    list: true,
    list_with_recursive: true,
    shared: false,
    ..Default::default()
};
https://github.com/apache/opendal/issues/2483 "feature request: support copy and rename for memory services" https://github.com/apache/opendal/pull/2513 "feat(adapters-kv): add rename and copy support to kv adapters"