Class AbstractArchiveFileTreeElement
java.lang.Object
org.gradle.api.internal.file.AbstractFileTreeElement
io.freefair.gradle.plugins.compress.tree.AbstractArchiveFileTreeElement
- All Implemented Interfaces:
FileTreeElement,FileVisitDetails
- Direct Known Subclasses:
ArFileTree.ArArchiveEntryFileTreeElement,ArjFileTree.ArjArchiveEntryFileTreeElement,DumpFileTree.DumpArchiveEntryFileTreeElement,SevenZipFileTree.SevenZArchiveEntryFileTreeElement
public abstract class AbstractArchiveFileTreeElement
extends org.gradle.api.internal.file.AbstractFileTreeElement
implements FileVisitDetails
An implementation of
FileTreeElement meant
for use with archive files when subclassing AbstractFileTree.
This implementation extracts the files from the archive to the supplied expansion directory.
- See Also:
-
AbstractArchiveFileTreeElement
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractArchiveFileTreeElement(org.gradle.internal.file.Chmod chmod, File expandedDir, AtomicBoolean stopFlag) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract ArchiveEntryReturns the archive entry for this element.protected abstract StringReturns unsafe name for the name of a file contained in the archive.getFile()longlonggetSize()booleanprotected StringReturns a safe name for the name of a file contained in the archive.voidMethods inherited from class org.gradle.api.internal.file.AbstractFileTreeElement
copyTo, copyTo, getChmod, getDisplayName, getName, getPath, getPermissions, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.gradle.api.file.FileTreeElement
copyTo, copyTo, getName, getPath, getPermissions, open
-
Constructor Details
-
AbstractArchiveFileTreeElement
protected AbstractArchiveFileTreeElement(org.gradle.internal.file.Chmod chmod, File expandedDir, AtomicBoolean stopFlag) Creates a new instance.- Parameters:
chmod- the chmod instance to useexpandedDir- the directory to extract the archived file tostopFlag- the stop flag to use
-
-
Method Details
-
getArchiveEntry
Returns the archive entry for this element.- Returns:
- the archive entry
-
safeEntryName
Returns a safe name for the name of a file contained in the archive.- See Also:
-
PathTraversalChecker.safePathName(String)
-
getEntryName
Returns unsafe name for the name of a file contained in the archive.- See Also:
-
AbstractArchiveFileTreeElement.safeEntryName()
-
getFile
- Specified by:
getFilein interfaceFileTreeElement
-
getRelativePath
- Specified by:
getRelativePathin interfaceFileTreeElement
-
getLastModified
public long getLastModified()- Specified by:
getLastModifiedin interfaceFileTreeElement
-
isDirectory
public boolean isDirectory()- Specified by:
isDirectoryin interfaceFileTreeElement
-
getSize
public long getSize()- Specified by:
getSizein interfaceFileTreeElement
-
stopVisiting
public void stopVisiting()- Specified by:
stopVisitingin interfaceFileVisitDetails
-