Package spoon.support.compiler
Class ZipFolder
java.lang.Object
spoon.support.compiler.ZipFolder
- All Implemented Interfaces:
SpoonFolder
,SpoonResource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a file in this foldervoid
addFolder(SpoonFolder source)
Adds a sub folder in this folderboolean
void
physically extracts on disk all files of this zip file in the destinationDir `destDir`Gets all the files (including folders) in the folder.Gets all the Java source files in the folder.getFiles()
Gets all the files (excluding folders) in the folder.Gets the parent of this resource on the file system.getName()
Gets the name of this resource.Gets the folder that contains this resource.getPath()
Gets this resource path.Gets the subfolders in this folder.int
hashCode()
boolean
Tells if this resource is an archive.boolean
isFile()
Tells if this resource is a file.toFile()
Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).toString()
-
Constructor Details
-
ZipFolder
- Throws:
IOException
-
-
Method Details
-
getAllFiles
Description copied from interface:SpoonFolder
Gets all the files (including folders) in the folder.- Specified by:
getAllFiles
in interfaceSpoonFolder
-
getAllJavaFiles
Description copied from interface:SpoonFolder
Gets all the Java source files in the folder.- Specified by:
getAllJavaFiles
in interfaceSpoonFolder
-
getFiles
Description copied from interface:SpoonFolder
Gets all the files (excluding folders) in the folder.- Specified by:
getFiles
in interfaceSpoonFolder
-
getName
Description copied from interface:SpoonResource
Gets the name of this resource.- Specified by:
getName
in interfaceSpoonResource
-
getParent
Description copied from interface:SpoonResource
Gets the folder that contains this resource.- Specified by:
getParent
in interfaceSpoonResource
-
getSubFolders
Description copied from interface:SpoonFolder
Gets the subfolders in this folder.- Specified by:
getSubFolders
in interfaceSpoonFolder
-
isFile
public boolean isFile()Description copied from interface:SpoonResource
Tells if this resource is a file.- Specified by:
isFile
in interfaceSpoonResource
-
toString
-
getPath
Description copied from interface:SpoonResource
Gets this resource path.- Specified by:
getPath
in interfaceSpoonResource
-
isArchive
public boolean isArchive()Description copied from interface:SpoonResource
Tells if this resource is an archive.- Specified by:
isArchive
in interfaceSpoonResource
-
getFileSystemParent
Description copied from interface:SpoonResource
Gets the parent of this resource on the file system.- Specified by:
getFileSystemParent
in interfaceSpoonResource
-
toFile
Description copied from interface:SpoonResource
Gets the corresponding file if possible (returns null if this resource does not correspond to any file on the filesystem).- Specified by:
toFile
in interfaceSpoonResource
-
hashCode
public int hashCode() -
equals
-
addFile
Description copied from interface:SpoonFolder
Adds a file in this folder- Specified by:
addFile
in interfaceSpoonFolder
-
addFolder
Description copied from interface:SpoonFolder
Adds a sub folder in this folder- Specified by:
addFolder
in interfaceSpoonFolder
-
extract
physically extracts on disk all files of this zip file in the destinationDir `destDir`
-