You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "prabirshrestha (via GitHub)" <gi...@apache.org> on 2024/01/20 05:11:37 UTC
[I] Add support for trash [opendal]
prabirshrestha opened a new issue, #4032:
URL: https://github.com/apache/opendal/issues/4032
Seems like google drive supports trash. https://github.com/apache/opendal/pull/4002 Is it possible to have the same for other services? I'm primarily looking for OS FSBackend. Could be possible with https://crates.io/crates/trash. Accidentally deleting files can be risky so having a way to safely move to trash would be great. For those that doesn't support trash an option could be to move to a different folder when calling delete. While I could have if..else, having an option when creating the operator would be great.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add support for trash [opendal]
Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo closed issue #4032: Add support for trash
URL: https://github.com/apache/opendal/issues/4032
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Add support for trash [opendal]
Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo commented on issue #4032:
URL: https://github.com/apache/opendal/issues/4032#issuecomment-7062227289
Thanks, @prabirshrestha, for raising the need to recover accidentally deleted files.
Deletion behavior depends on the service. OpenDAL's Google Drive service sends deleted files to Drive's trash. `Operator::restore` recovers objects that a backend retains in a recoverable state when the service supports restore. Google Drive restore is still tracked in #8158.
The `fs` service uses standard filesystem deletion. A generic move-to-trash option would need to define how to handle naming collisions, how long to retain files, and what happens when a move fails partway. For local files, applications can call an OS trash API directly, for example through the Rust `trash` crate, or use `rename` to move files into an application-managed quarantine directory with their own naming and retention rules.
Closing this as not planned. If a concrete use case calls for native OS trash support in `fs`, a focused proposal that defines the behavior on each supported platform would be welcome.
*Note: This comment was generated with AI assistance.*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@opendal.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org