stefanbirkner / fake-sftp-server-rule

A JUnit rule that runs an in-memory SFTP server.
MIT License
40 stars 26 forks source link

Set file modification time during upload #21

Open jan-pieter opened 4 years ago

jan-pieter commented 4 years ago

I'm running a test suite where the modification time of a file is taken into account. Currently I have to add a Thread.sleep in order for these times to be different. It seems it is possible to set the modification time of a file using the BasicFileAttributeView It would be nice to be able to set the modification time during upload. (Maybe the creation time and last accessed time as well, but I don't know if they are supported by the underlying filesystem.)