tempfile icon indicating copy to clipboard operation
tempfile copied to clipboard

Clarify `permissions` guarantees in in `Builder`

Open n0toose opened this issue 1 year ago • 1 comments

The documentation currently shows an example of the Unix-only permissions function being used in combination with the Builder, but the documentation reads like the user is supposed to also check whether the permissions were set correctly in the resulting folder: https://docs.rs/tempfile/latest/tempfile/struct.Builder.html#method.permissions

  • Is it safe to assume that the directory / file will be created using the permissions that were explicitly stated to do so?
  • If not, should Builder also take on the responsibility of checking the resulting file / directory before returning it to the user? Should this be explicitly documented?
  • If yes, should this be explicitly documented?

n0toose avatar Nov 18 '24 17:11 n0toose

This is just an example showing that the permissions were set correctly.

Stebalien avatar Nov 18 '24 19:11 Stebalien