|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.quadrique.jbuildingblocks.core.io.file.JbbFile
public class JbbFile
This class provides goodies to manipulate File(s)
| Method Summary | |
|---|---|
static void |
copyTree(File zSourceFolder,
File zDestFolder)
Copy a folder and all its sub folders to another location |
static void |
deleteTree(File zStartFolder,
boolean zRemoveSubFolders)
Delete a folder and all its sub folders and their content. |
static ArrayList<File> |
findFiles(File zStartFolder,
ArrayList<String> zFileStartsWith,
ArrayList<String> zFileEndsWith,
boolean zScanSubFolders)
|
static List<File> |
geDirListing(File aStartingDir,
boolean recursive)
Recursively (optional) walk a directory tree and return a List of all directories found; the List is sorted using File.compareTo. |
static List<File> |
getFileListing(File aStartingDir,
boolean recursive)
Recursively (optional) walk a directory tree and return a List of all Files found; the List is sorted using File.compareTo. |
static JbbFile |
newInstance()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static JbbFile newInstance()
public static void copyTree(File zSourceFolder,
File zDestFolder)
throws Exception
zSourceFolder - zDestFolder -
Exception
public static void deleteTree(File zStartFolder,
boolean zRemoveSubFolders)
throws Exception
zStartFolder - The folder to start with. This folder and all its content will be removed.zRemoveSubFolders - Set to true to delete all sub folders and their content.
Exception
public static ArrayList<File> findFiles(File zStartFolder,
ArrayList<String> zFileStartsWith,
ArrayList<String> zFileEndsWith,
boolean zScanSubFolders)
throws Exception
zStartFolder - zFileStartsWith - zFileEndsWith -
Exception
public static List<File> getFileListing(File aStartingDir,
boolean recursive)
throws FileNotFoundException
aStartingDir - is a valid directory, which can be read.recursive - Set to true if you want sub folders to be included
FileNotFoundException
public static List<File> geDirListing(File aStartingDir,
boolean recursive)
throws FileNotFoundException
aStartingDir - is a valid directory, which can be read.recursive - Set to true if you want sub folders to be included
FileNotFoundException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||