Hi! I have a use case[^1] where both the atime and mtime are optional and where following the symlink is optional. While looking through the source code of this crate, I found this function in the unix-specific part of the library, which fits my use case perfectly, but it's not public:
Similar functions do not yet exist for the Windows and Redox implementations, but I think those could be added with relatively little effort.
If you decide to expose this, I'd recommend a name like set_path_times, mirroring the set_file_handle_times name, which is very similar in functionality. I would be happy to open a PR for this.
Hi! I have a use case[^1] where both the atime and mtime are optional and where following the symlink is optional. While looking through the source code of this crate, I found this function in the unix-specific part of the library, which fits my use case perfectly, but it's not public:
https://github.com/alexcrichton/filetime/blob/5eec5a5547b0fb67a3ed795db9da8e0c360c0009/src/unix/linux.rs#L87-L92
Similar functions do not yet exist for the Windows and Redox implementations, but I think those could be added with relatively little effort.
If you decide to expose this, I'd recommend a name like
set_path_times
, mirroring theset_file_handle_times
name, which is very similar in functionality. I would be happy to open a PR for this.This would also partially fix https://github.com/alexcrichton/filetime/issues/83, albeit not in the most elegant way.
[^1]: The
touch
utility ofuutils
, which basically acts as a wrapper around theutimensat
syscall and therefore requires the same flexibility.