Closed DeepDiver1975 closed 4 months ago
Sounds sensible to me. Can we keep the old name of the method though? It feels more consistent with the rest of the method names (which also operate on files without having File
in the name, for instance).
The PUT method can also be used to overwrite an existing resource. FileSystem.Create()
feels a bit wrong.
os.Create
behaves the same way though: it overwrites any previous file.
@emersion done - THX
The existing interface seems to be driven be the local file system implementation.
For e.g. an S3 implementation of PUT a bit more control over is required. By passing in request.Body into FileSystem.PutFile() the implementation can directly stream the request content to the target or perform chunked/multi-part upload or what ever is necessary ...