public class VirtualFolder extends Object implements SpoonFolder
Constructor and Description |
---|
VirtualFolder() |
Modifier and Type | Method and Description |
---|---|
void |
addFile(SpoonFile o)
Adds a file in this folder
|
void |
addFolder(SpoonFolder o)
Adds a sub folder in this folder
|
List<SpoonFile> |
getAllFiles()
Gets all the files (including folders) in the folder.
|
List<SpoonFile> |
getAllJavaFiles()
Gets all the Java source files in the folder.
|
List<SpoonFile> |
getFiles()
Gets all the files (excluding folders) in the folder.
|
File |
getFileSystemParent()
Gets the parent of this resource on the file system.
|
String |
getName()
Gets the name of this resource.
|
SpoonFolder |
getParent()
Gets the folder that contains this resource.
|
String |
getPath()
Gets this resource path.
|
List<SpoonFolder> |
getSubFolders()
Gets the subfolders in this folder.
|
boolean |
isArchive()
Tells if this resource is an archive.
|
boolean |
isFile()
Tells if this resource is a file.
|
File |
toFile()
Gets the corresponding file if possible (returns null if this resource
does not correspond to any file on the filesystem).
|
String |
toString() |
public void addFile(SpoonFile o)
SpoonFolder
addFile
in interface SpoonFolder
public void addFolder(SpoonFolder o)
SpoonFolder
addFolder
in interface SpoonFolder
public List<SpoonFile> getAllFiles()
SpoonFolder
getAllFiles
in interface SpoonFolder
public List<SpoonFile> getAllJavaFiles()
SpoonFolder
getAllJavaFiles
in interface SpoonFolder
public List<SpoonFile> getFiles()
SpoonFolder
getFiles
in interface SpoonFolder
public String getName()
SpoonResource
getName
in interface SpoonResource
public SpoonFolder getParent()
SpoonResource
getParent
in interface SpoonResource
public List<SpoonFolder> getSubFolders()
SpoonFolder
getSubFolders
in interface SpoonFolder
public boolean isFile()
SpoonResource
isFile
in interface SpoonResource
public String getPath()
SpoonResource
getPath
in interface SpoonResource
public File getFileSystemParent()
SpoonResource
getFileSystemParent
in interface SpoonResource
public boolean isArchive()
SpoonResource
isArchive
in interface SpoonResource
public File toFile()
SpoonResource
toFile
in interface SpoonResource
Copyright © 2007–2014 Inria. All rights reserved.