Stebalien / tempfile

Temporary file library for rust
http://stebalien.com/projects/tempfile-rs
Apache License 2.0
1.15k stars 113 forks source link

Option to use `remove_dir` only instead of `remove_dir_all` #270

Closed mythi closed 7 months ago

mythi commented 7 months ago

I'm looking to use tempdir to handle temporary dirs on Linux configfs that has a property that the kernel handles the file attributes upon rmdir/mkdir.

Because of that remove_dir_all gets an error from the kernel when it first tries to remove the file attributes and only after that the directory itself.

I could workaround this to handle dropping myself but I'd also prefer to rely on the automatic drop from the library.

Stebalien commented 7 months ago

I think you mean files, not attributes (well, attributes from the perspective of configfs). That's an interesting use-case but, IMO, outside the scope of this library.

mythi commented 7 months ago

Yes, files. I can understand the feedback, though