Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make a new interface for direct SetStat access.
I'm really not especially happy with this. It works, it's minimally invasive, and it feels like the wrong solution. I'm pretty sure that the right solution is a breaking change of the Request structure, to just flat out contain FileAttrFlags and FileStat, having requestFromPacket do the parsing into those structures. But that's an API change, and I doubt that we want a major version bump for this. As an alternative, we could have a new Request structure type, with that layout, and have public functions for converting between them. That would at least make it possible for someone to construct the Request structure for a Setstat command. The use case of this is being able to populate a memfile backed sftp server with test data that has specific timestamps, as part of the test framework of an internal program. I'm definitely open to other ideas on how to solve this problem.
- Loading branch information