Eric Bower
·
2026-05-31
1package rsync
2
3// rsync.h.
4const (
5 XMIT_TOP_DIR = (1 << 0)
6 XMIT_SAME_MODE = (1 << 1)
7 XMIT_EXTENDED_FLAGS = (1 << 2)
8 XMIT_SAME_RDEV_pre28 = XMIT_EXTENDED_FLAGS /* Only in protocols < 28 */
9 XMIT_SAME_UID = (1 << 3)
10 XMIT_SAME_GID = (1 << 4)
11 XMIT_SAME_NAME = (1 << 5)
12 XMIT_LONG_NAME = (1 << 6)
13 XMIT_SAME_TIME = (1 << 7)
14 XMIT_SAME_RDEV_MAJOR = (1 << 8)
15 XMIT_HAS_IDEV_DATA = (1 << 9)
16 XMIT_SAME_DEV = (1 << 10)
17 XMIT_RDEV_MINOR_IS_SMALL = (1 << 11)
18)
19
20// as per /usr/include/bits/stat.h.
21const (
22 S_IFMT = 0o0170000 // bits determining the file type
23 S_IFDIR = 0o0040000 // Directory
24 S_IFCHR = 0o0020000 // Character device
25 S_IFBLK = 0o0060000 // Block device
26 S_IFREG = 0o0100000 // Regular file
27 S_IFIFO = 0o0010000 // FIFO
28 S_IFLNK = 0o0120000 // Symbolic link
29 S_IFSOCK = 0o0140000 // Socket
30)
31
32// ProtocolVersion defines the currently implemented rsync protocol
33// version. Protocol version 27 seems to be the safest bet for wide
34// compatibility: version 27 was introduced by rsync 2.6.0 (released 2004), and
35// is supported by openrsync and rsyn.
36const ProtocolVersion = 27