fs: unexport DeviceID
This commit is contained in:
parent
70fbad6623
commit
e79dca644e
3 changed files with 6 additions and 6 deletions
|
@ -10,9 +10,9 @@ import (
|
||||||
"github.com/restic/restic/internal/errors"
|
"github.com/restic/restic/internal/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DeviceID extracts the device ID from an os.FileInfo object by casting it
|
// deviceID extracts the device ID from an os.FileInfo object by casting it
|
||||||
// to syscall.Stat_t
|
// to syscall.Stat_t
|
||||||
func DeviceID(fi os.FileInfo) (deviceID uint64, err error) {
|
func deviceID(fi os.FileInfo) (deviceID uint64, err error) {
|
||||||
if fi == nil {
|
if fi == nil {
|
||||||
return 0, errors.New("unable to determine device: fi is nil")
|
return 0, errors.New("unable to determine device: fi is nil")
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ import (
|
||||||
"github.com/restic/restic/internal/errors"
|
"github.com/restic/restic/internal/errors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DeviceID extracts the device ID from an os.FileInfo object by casting it
|
// deviceID extracts the device ID from an os.FileInfo object by casting it
|
||||||
// to syscall.Stat_t
|
// to syscall.Stat_t
|
||||||
func DeviceID(fi os.FileInfo) (deviceID uint64, err error) {
|
func deviceID(_ os.FileInfo) (deviceID uint64, err error) {
|
||||||
return 0, errors.New("Device IDs are not supported on Windows")
|
return 0, errors.New("Device IDs are not supported on Windows")
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,8 +48,8 @@ func (fs Local) Lstat(name string) (os.FileInfo, error) {
|
||||||
|
|
||||||
// DeviceID extracts the DeviceID from the given FileInfo. If the fs does
|
// DeviceID extracts the DeviceID from the given FileInfo. If the fs does
|
||||||
// not support a DeviceID, it returns an error instead
|
// not support a DeviceID, it returns an error instead
|
||||||
func (fs Local) DeviceID(fi os.FileInfo) (deviceID uint64, err error) {
|
func (fs Local) DeviceID(fi os.FileInfo) (id uint64, err error) {
|
||||||
return DeviceID(fi)
|
return deviceID(fi)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Join joins any number of path elements into a single path, adding a
|
// Join joins any number of path elements into a single path, adding a
|
||||||
|
|
Loading…
Reference in a new issue