public class TXZUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(java.lang.String ElementPath)
Returns true if in the given path exists an element, false otherwise.
|
static boolean |
isDirectory(java.lang.String ElementPath)
Like the name implies, this method returns true if the element is a directory.
|
static boolean |
isFile(java.lang.String ElementPath)
Like the name implies, this method returns true if the element is a file.
|
static java.io.File[] |
scanDirectory(java.lang.String DirectoryToScan)
Scans the given directory and returns a File array with all the files and
directories found in.
|
static java.io.File[] |
scanDirectory(java.lang.String DirectoryToScan,
boolean RecursiveScan,
int Levels)
Scans the given directory and returns a File array with all the files and
directories found in.
|
public static boolean exists(java.lang.String ElementPath)
ElementPath
- String containing the path of the element.isFile
,
isDirectory
public static boolean isFile(java.lang.String ElementPath)
ElementPath
- String containing the path of the element.isDirectory
public static boolean isDirectory(java.lang.String ElementPath)
ElementPath
- String containing the path of the element.isFile
public static java.io.File[] scanDirectory(java.lang.String DirectoryToScan, boolean RecursiveScan, int Levels) throws java.io.FileNotFoundException, java.io.IOException
DirectoryToScan
- String containing the path of the directory.RecursiveScan
- Boolean value indicating a recursive scan.Levels
- Integer containing the level of recursion, if this is -1,
it recurses infinitely.java.io.FileNotFoundException
- Throwed when the directory doesn't exists.java.io.IOException
- Throwed when the given path is not a directory.public static java.io.File[] scanDirectory(java.lang.String DirectoryToScan) throws java.io.FileNotFoundException, java.io.IOException
DirectoryToScan
- String containing the path of the directory.java.io.FileNotFoundException
- Throwed when the directory doesn't exists.java.io.IOException
- Throwed when the given path is not a directory.