Class Directory
java.lang.Object
org.fedoraproject.xmvn.tools.install.File
org.fedoraproject.xmvn.tools.install.Directory
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.
- Author:
- Mikolaj Izdebski
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Get additional file attributes to be added to file descriptor.protected void
installContents
(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 Details
-
Directory
Create a directory with specified path and default permissions (0755).- Parameters:
targetPath
- directory path, relative to installation root
-
Directory
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 Details
-
installContents
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:
IOException
-
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
)
-