equal
deleted
inserted
replaced
35 * |
35 * |
36 * A class encapsulating a directory and a set of files within it. |
36 * A class encapsulating a directory and a set of files within it. |
37 */ |
37 */ |
38 class RelativeFileSet { |
38 class RelativeFileSet { |
39 |
39 |
40 private String mode; |
|
41 private String os; |
|
42 private String arch; |
|
43 |
|
44 private File basedir; |
40 private File basedir; |
45 private Set<String> files = new LinkedHashSet<>(); |
41 private Set<String> files = new LinkedHashSet<>(); |
46 |
42 |
47 RelativeFileSet(RelativeFileSet copy) { |
43 RelativeFileSet(RelativeFileSet copy) { |
48 mode = copy.mode; |
|
49 os = copy.os; |
|
50 arch = copy.arch; |
|
51 basedir = copy.basedir; |
44 basedir = copy.basedir; |
52 files = new LinkedHashSet<>(copy.files); |
45 files = new LinkedHashSet<>(copy.files); |
53 } |
46 } |
54 |
47 |
55 RelativeFileSet(File base, Collection<File> files) { |
48 RelativeFileSet(File base, Collection<File> files) { |
110 |
103 |
111 Set<String> getIncludedFiles() { |
104 Set<String> getIncludedFiles() { |
112 return files; |
105 return files; |
113 } |
106 } |
114 |
107 |
115 void dump() { |
|
116 Log.verbose("\n=========\nBasedir: " + basedir + "\n"); |
|
117 for (String fname : files) { |
|
118 Log.verbose(" " + fname); |
|
119 } |
|
120 Log.verbose("\n========"); |
|
121 } |
|
122 |
|
123 String getMode() { |
|
124 return mode; |
|
125 } |
|
126 |
|
127 void setMode(String mode) { |
|
128 this.mode = mode; |
|
129 } |
|
130 |
|
131 String getOs() { |
|
132 return os; |
|
133 } |
|
134 |
|
135 void setOs(String os) { |
|
136 this.os = os; |
|
137 } |
|
138 |
|
139 String getArch() { |
|
140 return arch; |
|
141 } |
|
142 |
|
143 void setArch(String arch) { |
|
144 this.arch = arch; |
|
145 } |
|
146 |
|
147 @Override |
108 @Override |
148 public String toString() { |
109 public String toString() { |
149 return "RelativeFileSet{basedir:" + basedir + ", files:" + files + "}"; |
110 return "RelativeFileSet {basedir:" + basedir |
|
111 + ", files: {" + files + ")}"; |
150 } |
112 } |
151 |
113 |
152 } |
114 } |