1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-30 00:00:14 +01:00
restic/internal/fs
greatroar 50d8377e31 archiver: Shortcut for handling empty files
Regular files that are empty according to stat are now not opened for
reading their contents. Such files are quite common (in my homedir, at
least) and we can save multiple system calls this way. On a network
filesystem, that can mean round trips. Also, we can back up empty files
that we cannot open for reading. Finally, fixes #4257.

Existing tests cover this case. fs.Reader now no longer has a meaningful
Size. Nothing depended on that.
2023-03-23 08:13:48 +01:00
..
const.go fs: Add O_NONBLOCK 2018-04-30 15:34:58 +02:00
const_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
const_windows.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
deviceid_unix.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
deviceid_windows.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
doc.go Moves files 2017-07-23 14:19:13 +02:00
file.go issue2699: restore symlinks on windows when run as admin user 2022-10-29 21:19:33 +02:00
file_unix.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
file_windows.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
file_windows_test.go Add simple test for fs.TempFile on windows 2022-04-09 23:37:58 +02:00
fs_local.go backup: Set O_NOATIME in the right place 2022-02-06 15:00:37 +01:00
fs_local_vss.go golangci-lint: replace deprecated golint with revive 2022-03-28 22:33:17 +02:00
fs_reader.go archiver: Shortcut for handling empty files 2023-03-23 08:13:48 +01:00
fs_reader_test.go archiver: Shortcut for handling empty files 2023-03-23 08:13:48 +01:00
fs_track.go fs: Add interface and FS implementations 2018-04-22 11:37:05 +02:00
helpers.go Simplify os.ModeType|os.ModeCharDevice => os.ModeType 2020-09-21 14:21:32 +02:00
interface.go Remove io.Writer from fs.File 2020-09-21 14:21:32 +02:00
path_prefix.go fs: Make HasPathPrefix work with relative paths 2018-01-05 17:38:52 +01:00
path_prefix_test.go fs: Make HasPathPrefix work with relative paths 2018-01-05 17:38:52 +01:00
setflags_linux.go Set O_NOATIME flag on Linux 2022-02-06 15:00:34 +01:00
setflags_linux_test.go Replace most usages of ioutil with the underlying function 2022-12-02 19:36:43 +01:00
setflags_other.go Set O_NOATIME flag on Linux 2022-02-06 15:00:34 +01:00
stat.go Examine file ctime when checking if files have changed. 2019-04-23 21:54:35 -05:00
stat_bsd.go fs: Remove explicit type check in extendedStat 2022-11-27 19:58:06 +01:00
stat_test.go test: Use testing.T.Cleanup to remove tempdirs 2022-12-09 14:23:55 +01:00
stat_unix.go fs: Remove explicit type check in extendedStat 2022-11-27 19:58:06 +01:00
stat_windows.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
vss.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00
vss_windows.go add go:build headers everywhere 2022-03-28 22:23:47 +02:00