afero/zipfs
Oliver Bone 428eac8624
Add Chmod() method to File
`os.File` offers a `Chmod()` method. This is often safer and more direct
to use than `os.Chmod()` because it operates on an open file descriptor
rather than having to lookup the file by name. Without this, it's
possible for the target file to be renamed, in which case an
`os.Chmod()` would either fail or apply to any file that's taken its
place.

Therefore, add the `Chmod()` method to the `File` interface, and
implement it for all `File` implementations. The bulk of this change is
in `MemMapFs`, which required moving the chmod functionality down into
the `mem` package so that it can be shared between both `mem.File` and
`MemMapFs`.
2022-05-20 14:02:18 +01:00
..
testdata Add failing test for reading a small zip file 2020-06-25 23:25:49 -05:00
file.go Add Chmod() method to File 2022-05-20 14:02:18 +01:00
file_test.go Add failing test for reading a small zip file 2020-06-25 23:25:49 -05:00
fs.go Fix Chown() pull request errors 2020-12-07 15:19:45 +02:00
zipfs_test.go Use filepath.Separator in test code, to fix tests on Windows 2020-03-30 14:44:04 +02:00