|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectigpp.util.Listing
public class Listing
Simple file and directory listing utility methods.
Constructor Summary | |
---|---|
Listing()
|
Method Summary | |
---|---|
static boolean |
exists(File root,
String pathName)
Determine if a file or folder exists at the location of a File object. |
static File |
getFile(File root,
String pathName)
Get the File object file or folder with a given name located at the location
of a File object. |
static File[] |
getFileList(File root)
Get the list of files located at the location specified with File object. |
static File[] |
getFileList(File root,
String pattern)
Get the list of files located at the location specified with File object. |
static File[] |
getFileList(String pathName)
Get the list of files at the current path. |
static File[] |
getFileList(String pathName,
String pattern)
Get the list of files at the current path that match a particular pattern. |
static File[] |
getFileListByExtension(File root,
String extension)
Get the list of files at the current path that have a particular filename extension. |
static File[] |
getFileListByExtension(String pathName,
String extension)
Get the list of files at the current path that have a particular filename extension. |
static File |
getFirstFile(File root)
Get the first file in the sorted file list at the location specified with File object. |
static File[] |
getFolderList(File root)
Get the list of folders located at the location specified with File object. |
static File[] |
getFolderList(String pathName)
Get the list of folders at the current path. |
static File |
getLastFile(File root)
Get the last file in the sorted file list at the location specified with File object. |
static File |
getMostRecentFile(File root)
Get the most recent file placed in at the location specified with File object. |
static BufferedReader |
getReader(File root,
String pathName)
Obtain a BufferedReader for a file at the location of a File object. |
static BufferedReader |
getReader(String pathName)
Obtain a BufferedReader for pathname string. |
static File[] |
getSortedList(File[] list,
int sortOn)
Sort an array of File items based on an attribute of each file. |
static File[] |
getSortedList(File[] list,
int sortOn,
int direction)
Sort an array of File items based on an attribute of each file. |
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Listing()
Method Detail |
---|
public static void main(String[] args)
public static File[] getFolderList(String pathName)
File
items for each folder, null if no folders are present.public static File[] getFolderList(File root)
File
object.
File
items for each folder, null if no folders are present.public static File[] getFileList(String pathName)
File
items for each file, null if no files are present.public static File[] getFileListByExtension(String pathName, String extension)
File
items for each file, null if no files are present.public static File[] getFileListByExtension(File root, String extension)
File
items for each file, null if no files are present.public static File[] getFileList(String pathName, String pattern)
File
items for each file, null if no files are present.public static File[] getFileList(File root, String pattern)
File
object.
File
items for each file, null if no files are present.public static File[] getFileList(File root)
File
object.
File
items for each file, null if no files are present.public static File getMostRecentFile(File root)
File
object.
File
items for each file, null if no files are present.public static File getFirstFile(File root)
File
object.
File
items for each file, null if no files are present.public static File getLastFile(File root)
File
object.
File
items for each file, null if no files are present.public static File getFile(File root, String pathName)
File
object file or folder with a given name located at the location
of a File
object.
File
pointing to the desired file, otherwise null.public static boolean exists(File root, String pathName)
File
object.
public static File[] getSortedList(File[] list, int sortOn, int direction)
File
items based on an attribute of each file.
FileComparator
for a list of allowed values for sortOn and direction.
File
items for each file, null if no folders are present.public static File[] getSortedList(File[] list, int sortOn)
File
items based on an attribute of each file.
List is sorted in ascending order.
FileComparator
for a list of allowed values for sortOn.
File
items for each file, null if no folders are present.public static BufferedReader getReader(File root, String pathName)
BufferedReader
for a file at the location of a File
object.
BufferedReader
if file exists, otherwise null.public static BufferedReader getReader(String pathName)
BufferedReader
for pathname string.
BufferedReader
if file exists, otherwise null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |