mirror of https://github.com/micromata/borgbackup-butler.git

Kai Reinhard
28.10.2018 34de8e3ff4872c7e48e78d1fa102aa029ac2b261
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package de.micromata.borgbutler.json.borg;
 
import lombok.Getter;
import lombok.Setter;
 
import java.io.Serializable;
 
public class BorgFilesystemItem implements Serializable, Comparable<BorgFilesystemItem> {
    private static final long serialVersionUID = -5545350851640655468L;
 
    /**
     * d (directory), - (file)
     */
    @Getter
    @Setter
    protected String type;
    /**
     * Unix mode, e. g. <tt>drwxr-xr-x</tt>
     */
    @Getter
    @Setter
    protected String mode;
    @Getter
    protected String user;
    @Getter
    protected String group;
    @Getter
    protected long uid;
    @Getter
    protected long gid;
    @Getter
    @Setter
    protected String path;
    @Getter
    protected boolean healthy;
    @Getter
    protected String source;
    @Getter
    protected String linktarget;
    @Getter
    protected String flags;
    @Getter
    @Setter
    protected String mtime;
    @Getter
    @Setter
    protected long size;
 
    @Override
    public int compareTo(BorgFilesystemItem o) {
        if (path == o.path) {
            return 0;
        }
        if (path == null) {
            return -1;
        }
        if (o.path == null) {
            return 1;
        }
        return path.compareToIgnoreCase(o.path);
    }
}