mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-14 01:04:14 +00:00
Add symlink support at the protocol level
This commit is contained in:
parent
e0da2764c9
commit
ddc56c8a0d
@ -58,6 +58,10 @@ func (f FileInfo) IsDirectory() bool {
|
|||||||
return f.Flags&FlagDirectory != 0
|
return f.Flags&FlagDirectory != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f FileInfo) IsSymlink() bool {
|
||||||
|
return f.Flags&FlagSymlink != 0
|
||||||
|
}
|
||||||
|
|
||||||
func (f FileInfo) HasPermissionBits() bool {
|
func (f FileInfo) HasPermissionBits() bool {
|
||||||
return f.Flags&FlagNoPermBits == 0
|
return f.Flags&FlagNoPermBits == 0
|
||||||
}
|
}
|
||||||
@ -101,6 +105,10 @@ func (f FileInfoTruncated) IsDirectory() bool {
|
|||||||
return f.Flags&FlagDirectory != 0
|
return f.Flags&FlagDirectory != 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (f FileInfoTruncated) IsSymlink() bool {
|
||||||
|
return f.Flags&FlagSymlink != 0
|
||||||
|
}
|
||||||
|
|
||||||
func (f FileInfoTruncated) HasPermissionBits() bool {
|
func (f FileInfoTruncated) HasPermissionBits() bool {
|
||||||
return f.Flags&FlagNoPermBits == 0
|
return f.Flags&FlagNoPermBits == 0
|
||||||
}
|
}
|
||||||
@ -110,6 +118,7 @@ type FileIntf interface {
|
|||||||
IsDeleted() bool
|
IsDeleted() bool
|
||||||
IsInvalid() bool
|
IsInvalid() bool
|
||||||
IsDirectory() bool
|
IsDirectory() bool
|
||||||
|
IsSymlink() bool
|
||||||
HasPermissionBits() bool
|
HasPermissionBits() bool
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -53,6 +53,10 @@ const (
|
|||||||
FlagInvalid = 1 << 13
|
FlagInvalid = 1 << 13
|
||||||
FlagDirectory = 1 << 14
|
FlagDirectory = 1 << 14
|
||||||
FlagNoPermBits = 1 << 15
|
FlagNoPermBits = 1 << 15
|
||||||
|
FlagSymlink = 1 << 16
|
||||||
|
FlagSymlinkMissingTarget = 1 << 17
|
||||||
|
|
||||||
|
SymlinkTypeMask = FlagDirectory | FlagSymlinkMissingTarget
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
Loading…
Reference in New Issue
Block a user