Class PlexusIoSymlinkResource
- java.lang.Object
-
- org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource
-
- org.codehaus.plexus.components.io.resources.PlexusIoFileResource
-
- org.codehaus.plexus.components.io.resources.PlexusIoSymlinkResource
-
- All Implemented Interfaces:
FileInfo
,ContentSupplier
,FileSupplier
,NameSupplier
,ResourceAttributeSupplier
,SizeSupplier
,SymlinkDestinationSupplier
,PlexusIoResource
public class PlexusIoSymlinkResource extends PlexusIoFileResource implements SymlinkDestinationSupplier
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
symLinkDestination
private PlexusIoFileResource
targetResource
-
Fields inherited from interface org.codehaus.plexus.components.io.resources.PlexusIoResource
UNKNOWN_MODIFICATION_DATE, UNKNOWN_RESOURCE_SIZE
-
-
Constructor Summary
Constructors Modifier Constructor Description (package private)
PlexusIoSymlinkResource(java.io.File symlinkfile, java.lang.String name, PlexusIoResourceAttributes attrs)
private
PlexusIoSymlinkResource(java.io.File symlinkfile, java.lang.String name, PlexusIoResourceAttributes attrs, java.lang.String symLinkDestination, PlexusIoFileResource targetResource)
(package private)
PlexusIoSymlinkResource(java.io.File symlinkfile, java.lang.String name, PlexusIoResourceAttributes attrs, java.nio.file.Path linkPath)
private
PlexusIoSymlinkResource(java.io.File symlinkfile, java.lang.String name, PlexusIoResourceAttributes attrs, java.nio.file.Path path, java.nio.file.Path linkPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getLastModified()
Returns the date, when the resource was last modified, if known.PlexusIoResource
getLink()
long
getSize()
Returns the resources size, if known.java.lang.String
getSymlinkDestination()
PlexusIoResource
getTarget()
boolean
isDirectory()
Returns, whether theFileInfo
refers to a directory.boolean
isExisting()
Returns, whether the resource exists.boolean
isFile()
Returns, whether theFileInfo
refers to a file.-
Methods inherited from class org.codehaus.plexus.components.io.resources.PlexusIoFileResource
getAttributes, getContents, getDfos, getFile, getFileAttributes, getName, getURL, isSymbolicLink
-
Methods inherited from class org.codehaus.plexus.components.io.resources.AbstractPlexusIoResource
getName
-
-
-
-
Field Detail
-
symLinkDestination
private final java.lang.String symLinkDestination
-
targetResource
private final PlexusIoFileResource targetResource
-
-
Constructor Detail
-
PlexusIoSymlinkResource
PlexusIoSymlinkResource(@Nonnull java.io.File symlinkfile, java.lang.String name, @Nonnull PlexusIoResourceAttributes attrs) throws java.io.IOException
- Throws:
java.io.IOException
-
PlexusIoSymlinkResource
PlexusIoSymlinkResource(@Nonnull java.io.File symlinkfile, java.lang.String name, @Nonnull PlexusIoResourceAttributes attrs, java.nio.file.Path linkPath) throws java.io.IOException
- Throws:
java.io.IOException
-
PlexusIoSymlinkResource
private PlexusIoSymlinkResource(@Nonnull java.io.File symlinkfile, java.lang.String name, @Nonnull PlexusIoResourceAttributes attrs, java.nio.file.Path path, java.nio.file.Path linkPath) throws java.io.IOException
- Throws:
java.io.IOException
-
PlexusIoSymlinkResource
private PlexusIoSymlinkResource(@Nonnull java.io.File symlinkfile, java.lang.String name, @Nonnull PlexusIoResourceAttributes attrs, java.lang.String symLinkDestination, PlexusIoFileResource targetResource) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getSymlinkDestination
public java.lang.String getSymlinkDestination() throws java.io.IOException
- Specified by:
getSymlinkDestination
in interfaceSymlinkDestinationSupplier
- Throws:
java.io.IOException
-
getTarget
public PlexusIoResource getTarget()
-
getLink
public PlexusIoResource getLink() throws java.io.IOException
- Throws:
java.io.IOException
-
getSize
public long getSize()
Description copied from interface:PlexusIoResource
Returns the resources size, if known. Otherwise returnsPlexusIoResource.UNKNOWN_RESOURCE_SIZE
.- Specified by:
getSize
in interfacePlexusIoResource
- Specified by:
getSize
in interfaceSizeSupplier
- Overrides:
getSize
in classPlexusIoFileResource
-
isDirectory
public boolean isDirectory()
Description copied from interface:PlexusIoResource
Returns, whether theFileInfo
refers to a directory.- Specified by:
isDirectory
in interfaceFileInfo
- Specified by:
isDirectory
in interfacePlexusIoResource
- Overrides:
isDirectory
in classPlexusIoFileResource
-
isExisting
public boolean isExisting()
Description copied from interface:PlexusIoResource
Returns, whether the resource exists.- Specified by:
isExisting
in interfacePlexusIoResource
- Overrides:
isExisting
in classPlexusIoFileResource
-
isFile
public boolean isFile()
Description copied from interface:PlexusIoResource
Returns, whether theFileInfo
refers to a file.- Specified by:
isFile
in interfaceFileInfo
- Specified by:
isFile
in interfacePlexusIoResource
- Overrides:
isFile
in classPlexusIoFileResource
-
getLastModified
public long getLastModified()
Description copied from interface:PlexusIoResource
Returns the date, when the resource was last modified, if known. Otherwise, returnsPlexusIoResource.UNKNOWN_MODIFICATION_DATE
.- Specified by:
getLastModified
in interfacePlexusIoResource
- Overrides:
getLastModified
in classPlexusIoFileResource
- See Also:
File.lastModified()
-
-