public class ArchiveFileSet extends FileSet
Modifier and Type | Field and Description |
---|---|
java.lang.String |
dirGroupName |
java.lang.Integer |
dirMode |
java.lang.String |
dirUserName |
java.lang.String |
groupName |
java.lang.Integer |
mode |
java.lang.String |
prefix |
static java.util.Set<java.lang.String> |
REQUIRED_ATTRIBUTES |
java.lang.String |
userName |
static java.util.Set<java.lang.String> |
VALID_ATTRIBUTES |
directory, excludePatterns, includePatterns
Constructor and Description |
---|
ArchiveFileSet(java.nio.file.Path directory)
Constructs a new ArchiveFileSet.
|
ArchiveFileSet(java.nio.file.Path directory,
java.lang.String prefix)
Constructs a new ArchiveFileSet.
|
ArchiveFileSet(java.nio.file.Path directory,
java.lang.String prefix,
java.lang.Integer mode,
java.lang.String userName,
java.lang.String groupName,
java.lang.String dirUserName,
java.lang.String dirGroupName,
java.lang.Integer dirMode,
java.util.Collection<java.util.regex.Pattern> includePatterns,
java.util.Collection<java.util.regex.Pattern> excludePatterns)
Constructs a new ArchiveFileSet.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
attributesValid(java.util.Map<java.lang.String,java.lang.Object> attributes)
Determines if the attributes given can be used to construct an ArchiveFileSet.
|
static ArchiveFileSet |
fromAttributes(java.nio.file.Path dir,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Constructs an ArchiveFileSet from a Map of attributes.
|
java.util.Set<Directory> |
toDirectories()
Overrides the parent method, but uses the
dirGroupName , dirUserName and dirMode
variables to set the mode, userName and groupName inside the returned Directory objects. |
java.util.List<FileInfo> |
toFileInfos()
Converts this FileSet to a list of FileInfo objects.
|
ArchiveFileSet |
withDirGroupName(java.lang.String dirGroupName)
Sets the dirGroupName.
|
ArchiveFileSet |
withDirMode(java.lang.Integer dirMode)
Sets the dirMode.
|
ArchiveFileSet |
withDirUserName(java.lang.String dirUserName)
Sets the dirUserName.
|
ArchiveFileSet |
withGroupName(java.lang.String groupName)
Sets the groupName.
|
ArchiveFileSet |
withMode(java.lang.Integer mode)
Sets the mode.
|
ArchiveFileSet |
withPrefix(java.lang.String prefix)
Sets the prefix.
|
ArchiveFileSet |
withUserName(java.lang.String userName)
Sets the userName.
|
withExcludePatterns, withIncludePatterns
public static final java.util.Set<java.lang.String> REQUIRED_ATTRIBUTES
public static final java.util.Set<java.lang.String> VALID_ATTRIBUTES
public java.lang.String dirGroupName
public java.lang.Integer dirMode
public java.lang.String dirUserName
public java.lang.String groupName
public java.lang.Integer mode
public java.lang.String prefix
public java.lang.String userName
public ArchiveFileSet(java.nio.file.Path directory)
directory
- The directory of the FileSet.public ArchiveFileSet(java.nio.file.Path directory, java.lang.String prefix)
directory
- The directory of the FileSet.prefix
- The prefix used to calculate the relative paths in the FileInfo objects.public ArchiveFileSet(java.nio.file.Path directory, java.lang.String prefix, java.lang.Integer mode, java.lang.String userName, java.lang.String groupName, java.lang.String dirUserName, java.lang.String dirGroupName, java.lang.Integer dirMode, java.util.Collection<java.util.regex.Pattern> includePatterns, java.util.Collection<java.util.regex.Pattern> excludePatterns)
directory
- The directory of the FileSet.prefix
- (Optional) The prefix used to calculate the relative paths in the FileInfo objects.mode
- (Optional) The POSIX file mode.userName
- (Optional) The user name for the fileset.groupName
- (Optional) The group name for the fileset.dirUserName
- (Optional) The user name that the directories created by this ArchiveFileSet will use.dirGroupName
- (Optional) The group name that the directories created by this ArchiveFileSet will use.dirMode
- (Optional) The mode that the directories created by this ArchiveFileSet will use.includePatterns
- (Optional) A list of regular expression Pattern objects that list the files to include.excludePatterns
- (Optional) A list of regular expression Pattern objects that list the files to exclude.public static java.lang.String attributesValid(java.util.Map<java.lang.String,java.lang.Object> attributes)
attributes
- The attributes.public static ArchiveFileSet fromAttributes(java.nio.file.Path dir, java.util.Map<java.lang.String,java.lang.Object> attributes)
dir
- The directory for the ArchiveFileSet.attributes
- The attributes.public java.util.Set<Directory> toDirectories() throws java.io.IOException
dirGroupName
, dirUserName
and dirMode
variables to set the mode, userName and groupName inside the returned Directory objects.toDirectories
in class FileSet
java.io.IOException
- If the build fails.public java.util.List<FileInfo> toFileInfos() throws java.io.IOException
FileSet
toFileInfos
in class FileSet
java.io.IOException
- If the directory traversal fails.public ArchiveFileSet withDirGroupName(java.lang.String dirGroupName)
dirGroupName
- The dirGroupName.public ArchiveFileSet withDirMode(java.lang.Integer dirMode)
dirMode
- The dirMode.public ArchiveFileSet withDirUserName(java.lang.String dirUserName)
dirUserName
- The dirUserName.public ArchiveFileSet withGroupName(java.lang.String groupName)
groupName
- The groupName.public ArchiveFileSet withMode(java.lang.Integer mode)
mode
- The mode.public ArchiveFileSet withPrefix(java.lang.String prefix)
prefix
- The prefix.public ArchiveFileSet withUserName(java.lang.String userName)
userName
- The userName.