@Plugin(name="PosixViewAttribute", category="Core", printObject=true) public class PosixViewAttributeAction extends AbstractPathAction
Modifier and Type | Class and Description |
---|---|
static class |
PosixViewAttributeAction.Builder
Builder for the posix view attribute action.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
fileGroup
File group.
|
private java.lang.String |
fileOwner
File owner.
|
private java.util.Set<java.nio.file.attribute.PosixFilePermission> |
filePermissions
File permissions.
|
LOGGER
Modifier | Constructor and Description |
---|---|
private |
PosixViewAttributeAction(java.lang.String basePath,
boolean followSymbolicLinks,
int maxDepth,
PathCondition[] pathConditions,
StrSubstitutor subst,
java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions,
java.lang.String fileOwner,
java.lang.String fileGroup) |
Modifier and Type | Method and Description |
---|---|
protected java.nio.file.FileVisitor<java.nio.file.Path> |
createFileVisitor(java.nio.file.Path basePath,
java.util.List<PathCondition> conditions)
Creates a new
FileVisitor<Path> to pass to the Files.walkFileTree(Path, Set, int, FileVisitor)
method when the AbstractPathAction.execute() method is invoked. |
java.lang.String |
getFileGroup()
Returns file group if defined and the OS supports posix/group file attribute view,
null otherwise.
|
java.lang.String |
getFileOwner()
Returns file owner if defined and the OS supports owner file attribute view,
null otherwise.
|
java.util.Set<java.nio.file.attribute.PosixFilePermission> |
getFilePermissions()
Returns posix file permissions if defined and the OS supports posix file attribute,
null otherwise.
|
static PosixViewAttributeAction.Builder |
newBuilder() |
java.lang.String |
toString() |
execute, execute, getBasePath, getBasePathString, getMaxDepth, getOptions, getPathConditions, getStrSubstitutor, isFollowSymbolicLinks
close, isComplete, isInterrupted, reportException, run
private final java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions
private final java.lang.String fileOwner
private final java.lang.String fileGroup
private PosixViewAttributeAction(java.lang.String basePath, boolean followSymbolicLinks, int maxDepth, PathCondition[] pathConditions, StrSubstitutor subst, java.util.Set<java.nio.file.attribute.PosixFilePermission> filePermissions, java.lang.String fileOwner, java.lang.String fileGroup)
@PluginBuilderFactory public static PosixViewAttributeAction.Builder newBuilder()
protected java.nio.file.FileVisitor<java.nio.file.Path> createFileVisitor(java.nio.file.Path basePath, java.util.List<PathCondition> conditions)
AbstractPathAction
FileVisitor<Path>
to pass to the Files.walkFileTree(Path, Set, int, FileVisitor)
method when the AbstractPathAction.execute()
method is invoked.
The visitor is responsible for processing the files it encounters that are accepted by all filters.
createFileVisitor
in class AbstractPathAction
basePath
- base dir from where to start scanning for files to processconditions
- filters that determine if a file should be processedFileVisitor<Path>
public java.util.Set<java.nio.file.attribute.PosixFilePermission> getFilePermissions()
PosixFileAttributeView
public java.lang.String getFileOwner()
FileOwnerAttributeView
public java.lang.String getFileGroup()
PosixFileAttributeView
public java.lang.String toString()
toString
in class AbstractPathAction