rofinn / FilePathsBase.jl

Filesystem path types in julia
Other
79 stars 17 forks source link

`mktempdir` should support `cleanup=true` by default #141

Open ericphanson opened 2 years ago

ericphanson commented 2 years ago

to match Julia base on 1.3+. This would be something like adding atexit(() -> rm(dir; recursive=true)) inside mktempdir().

rofinn commented 2 years ago

Hmm, I suppose we can provide that very basic fallback for now. I suspect it won't work properly for all filesystems. For example, the base code:

  1. Maintains a proper registry of temp paths to cleanup
  2. Handles locking and unlocking the registry for concurrent updates
  3. Handles chmod permissions

I don't think this is applicable for S3Path, but it'll likely require overloading a custom temp_cleanup method.