1 | void setFileMode(String octalString) {↵ | | 1 | void setDirMode(String octalString) {↵
|
2 | checkArchiveAttributesAllowed();↵ | | 2 | checkArchiveAttributesAllowed();↵
|
3 | integerSetFileMode(Integer.parseInt(octalString, BASE_OCTAL));↵ | | 3 | integerSetDirMode(Integer.parseInt(octalString, BASE_OCTAL));↵
|
4 | }↵ | | 4 | }↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * specify the user, group and↵ | | 6 | * specify the user, group and↵
|
7 | * other modes in the standard Unix fashion;↵ | | 7 | * other modes in the standard Unix fashion;↵
|
8 | * optional, default=0644↵ | | 8 | * optional, default=0↵
|
9 | *↵ | | 9 | 755↵
|
10 | * <p>We use the strange name so this method doesn't appear in↵ | | 10 | * <p>We use the strange name so this method doesn't appear in↵
|
11 | * IntrospectionHelpers list of attribute setters.</p>↵ | | 11 | * IntrospectionHelpers list of attribute setters.</p>↵
|
12 | * @param mode a <code>int</code> value↵ | | 12 | * @param mode a <code>int</code> value↵
|
13 | * @since Ant 1.7↵ | | 13 | * @since Ant 1.7↵
|
14 | */↵ | | 14 | */↵
|
15 | public void integerSetFileMode(int mode) {↵ | | 15 | public void integerSetDirMode(int mode) {↵
|
16 | fileModeHasBeenSet = true;↵ | | 16 | dirModeHasBeenSet = true;↵
|
17 | this.fileMode = UnixStat.FILE_FLAG | mode;↵ | | 17 | this.dirMode = UnixStat.DIR_FLAG | mode;↵
|
18 | }↵ | | 18 | }↵
|
|
19 | /**↵ | | 19 | /**↵
|
20 | * Get the mode of the archive fileset↵ | | 20 | * Get the dir mode of the archive fileset↵
|
21 | * @param p the project to use↵ | | 21 | * @param p the project to use↵
|
22 | * @return the mode↵ | | 22 | * @return the mode↵
|
23 | */↵ | | 23 | */↵
|
24 | public int getFileMode(Project p) {↵ | | 24 | public int getDirMode(Project p) {↵
|
25 | if (isReference()) {↵ | | 25 | if (isReference()) {↵
|
26 | return ((ArchiveFileSet) getRef(p)).getFileMode(p);↵ | | 26 | return ((ArchiveFileSet) getRef(p)).getDirMode(p);↵
|
27 | }↵ | | 27 | }↵
|
28 | return fileMode;↵ | | 28 | return dirMode;↵
|
29 | }↵ | | 29 | }↵
|
|
30 | /**↵ | | 30 | /**↵
|
31 | * Whether the user has specified the mode explicitly.↵ | | 31 | * Whether the user has specified the mode explicitly.↵
|
| | | 32 | *↵
|
32 | * @return true if it has been set↵ | | 33 | * @return true if it has been set↵
|
33 | */↵ | | 34 | */↵
|
34 | public boolean hasFileModeBeenSet() {↵ | | 35 | public boolean hasDirModeBeenSet() {↵
|
35 | if (isReference()) {↵ | | 36 | if (isReference()) {↵
|
36 | return ((ArchiveFileSet) getRef(getProject())).hasFileModeBeenSet();↵ | | 37 | return ((ArchiveFileSet) getRef(getProject())).hasDirModeBeenSet();↵
|
37 | }↵ | | 38 | }↵
|
38 | return fileModeHasBeenSet;↵ | | 39 | return dirModeHasBeenSet;↵
|
39 | | | 40 |
|