Class Directory
- java.lang.Object
-
- org.fedoraproject.xmvn.tools.install.File
-
- org.fedoraproject.xmvn.tools.install.Directory
-
public class Directory extends File
A directory installed as part of a package.While package doesn't have to own all directories it creates, directories represented by instances of this class are assumed to be owned by the package they belong to.
-
-
Field Summary
-
Fields inherited from class org.fedoraproject.xmvn.tools.install.File
DEFAULT_MODE, DIRECTORY_MODE, MAX_MODE
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getDescriptorExtra()
Get additional file attributes to be added to file descriptor.protected void
installContents(java.nio.file.Path targetAbsolutePath)
Install the file into specified location.-
Methods inherited from class org.fedoraproject.xmvn.tools.install.File
equals, getAccessMode, getDescriptor, getTargetPath, hashCode, install
-
-
-
-
Constructor Detail
-
Directory
public Directory(java.nio.file.Path targetPath)
Create a directory with specified path and default permissions (0755).- Parameters:
targetPath
- directory path, relative to installation root
-
Directory
public Directory(java.nio.file.Path targetPath, int accessMode)
Create a directory with specified path and permissions.- Parameters:
targetPath
- directory path, relative to installation rootaccessMode
- Unix access mode of the file (must be an integer in range from 0 to 0777)
-
-
Method Detail
-
installContents
protected void installContents(java.nio.file.Path targetAbsolutePath) throws java.io.IOException
Description copied from class:File
Install the file into specified location.Implementations of this method can assume that all parent directory of target file already exists. Access mode of target file doesn't have to be set as it will be manipulated with other means.
- Specified by:
installContents
in classFile
- Parameters:
targetAbsolutePath
- absolute path to the target file- Throws:
java.io.IOException
-
getDescriptorExtra
protected java.lang.String getDescriptorExtra()
Description copied from class:File
Get additional file attributes to be added to file descriptor.By default there are no extra attributes, but subclasses can override this method and specify it.
- Overrides:
getDescriptorExtra
in classFile
- Returns:
- extra descriptor data (can be
null
)
-
-