You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opendal.apache.org by "crwen (via GitHub)" <gi...@apache.org> on 2025/12/16 14:49:31 UTC

Can root path be deleted?

GitHub user crwen created a discussion: Can root path be deleted?

If root is `/a/b/`,`b/` can be deleted by using `Operator::delete("/")`. Does this make sense?

```rust
#[tokio::test]
async fn delete_root() {
    // set root to "a/b/"
    let builder = FsConfig::default().into_builder().root("/a/b/");

    let op = Operator::new(builder).unwrap().finish();

    op.delete("/").await.unwrap(); // b will be deteleted
}
```

GitHub link: https://github.com/apache/opendal/discussions/7030

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen closed a discussion: Can root path be deleted?

If root is `/a/b/`,`b/` can be deleted by using `Operator::delete("/")`. Does this make sense?

```rust
#[tokio::test]
async fn delete_root() {
    // set root to "a/b/"
    let builder = FsConfig::default().into_builder().root("/a/b/");

    let op = Operator::new(builder).unwrap().finish();

    op.delete("/").await.unwrap(); // b will be deteleted
}
```

---
**Mailing list thread:** https://lists.apache.org/thread/t30l2d3yh2gpfh69f9k658lhmbmd505h


GitHub link: https://github.com/apache/opendal/discussions/7030

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen edited a discussion: Can root path be deleted?

If root is `/a/b/`,`b/` can be deleted by using `Operator::delete("/")`. Does this make sense?

```rust
#[tokio::test]
async fn delete_root() {
    // set root to "a/b/"
    let builder = FsConfig::default().into_builder().root("/a/b/");

    let op = Operator::new(builder).unwrap().finish();

    op.delete("/").await.unwrap(); // b will be deteleted
}
```

---
**Mailing list thread:** https://lists.apache.org/thread/t30l2d3yh2gpfh69f9k658lhmbmd505h


GitHub link: https://github.com/apache/opendal/discussions/7030

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen added a comment to the discussion: Can root path be deleted?

Yes.  If use has set `/a/b/c/` as the root, I know how to delete `/a/b/c/`, but I don't know how to delete `/a/b/` or `/a/`.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270390

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen added a comment to the discussion: Can root path be deleted?

Is there any way to delete the whole root path? Deleting the "a" directory of "/a/b/c/" for example.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270333

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
GitHub user Xuanwo added a comment to the discussion: Can root path be deleted?

Yep, I think it's expected.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270279

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
GitHub user Xuanwo added a comment to the discussion: Can root path be deleted?

Hi, I'm not sure what you mean. Are you referring to removing `/a/` when the user has set `/a/b/c/` as the root?

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270363

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
GitHub user Xuanwo added a comment to the discussion: Can root path be deleted?

> Yes. If use has set `/a/b/c/` as the root, I know how to delete `/a/b/c/`, but I don't know how to delete `/a/b/` or `/a/`. This might not happen in real scenario, I just want to know if it is possible.

No, that's not possible and it should not happen. The root path concept exists to prevent users from performing operations outside the root directory.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270457

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen added a comment to the discussion: Can root path be deleted?

Thanks, I'll close this discussion.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270470

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org


Re: Can root path be deleted?

Posted by "crwen (via GitHub)" <gi...@apache.org>.
GitHub user crwen edited a comment on the discussion: Can root path be deleted?

Yes.  If use has set `/a/b/c/` as the root, I know how to delete `/a/b/c/`, but I don't know how to delete `/a/b/` or `/a/`. This might not happen in real scenario, I just want to know if it is possible.

GitHub link: https://github.com/apache/opendal/discussions/7030#discussioncomment-15270390

----
This is an automatically sent email for dev@opendal.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@opendal.apache.org