public class Listing
extends java.lang.Object
Constructor and Description |
---|
Listing() |
Modifier and Type | Method and Description |
---|---|
static boolean |
exists(java.io.File root,
java.lang.String pathName)
Determine if a file or folder exists at the location of
a
File object. |
static java.io.File |
getFile(java.io.File root,
java.lang.String pathName)
|
static java.io.File[] |
getFileList(java.io.File root)
Get the list of files located at the location specified with
File object. |
static java.io.File[] |
getFileList(java.io.File root,
java.lang.String pattern)
Get the list of files located at the location specified with
File object. |
static java.io.File[] |
getFileList(java.lang.String pathName)
Get the list of files at the current path.
|
static java.io.File[] |
getFileList(java.lang.String pathName,
java.lang.String pattern)
Get the list of files at the current path that match a particular pattern.
|
static java.io.File[] |
getFileListByExtension(java.io.File root,
java.lang.String extension)
Get the list of files at the current path that have a particular filename extension.
|
static java.io.File[] |
getFileListByExtension(java.lang.String pathName,
java.lang.String extension)
Get the list of files at the current path that have a particular filename extension.
|
static java.io.File |
getFirstFile(java.io.File root)
Get the first file in the sorted file list at the location specified with
File object. |
static java.io.File[] |
getFolderList(java.io.File root)
Get the list of folders located at the location specified with
File object. |
static java.io.File[] |
getFolderList(java.lang.String pathName)
Get the list of folders at the current path.
|
static java.io.File |
getLastFile(java.io.File root)
Get the last file in the sorted file list at the location specified with
File object. |
static java.io.File |
getMostRecentFile(java.io.File root)
Get the most recent file placed in at the location specified with
File object. |
static java.io.BufferedReader |
getReader(java.io.File root,
java.lang.String pathName)
Obtain a
BufferedReader for a file at the location of a File object. |
static java.io.BufferedReader |
getReader(java.lang.String pathName)
Obtain a
BufferedReader for pathname string. |
static java.io.File[] |
getSortedList(java.io.File[] list,
int sortOn)
Sort an array of
File items based on an attribute of each file. |
static java.io.File[] |
getSortedList(java.io.File[] list,
int sortOn,
int direction)
Sort an array of
File items based on an attribute of each file. |
static void |
main(java.lang.String[] args) |
public static void main(java.lang.String[] args)
public static java.io.File[] getFolderList(java.lang.String pathName)
File
items for each folder, null if no folders are present.public static java.io.File[] getFolderList(java.io.File root)
File
object.File
items for each folder, null if no folders are present.public static java.io.File[] getFileList(java.lang.String pathName)
File
items for each file, null if no files are present.public static java.io.File[] getFileListByExtension(java.lang.String pathName, java.lang.String extension)
File
items for each file, null if no files are present.public static java.io.File[] getFileListByExtension(java.io.File root, java.lang.String extension)
File
items for each file, null if no files are present.public static java.io.File[] getFileList(java.lang.String pathName, java.lang.String pattern)
File
items for each file, null if no files are present.public static java.io.File[] getFileList(java.io.File root, java.lang.String pattern)
File
object.File
items for each file, null if no files are present.public static java.io.File[] getFileList(java.io.File root)
File
object.File
items for each file, null if no files are present.public static java.io.File getMostRecentFile(java.io.File root)
File
object.File
items for each file, null if no files are present.public static java.io.File getFirstFile(java.io.File root)
File
object.File
items for each file, null if no files are present.public static java.io.File getLastFile(java.io.File root)
File
object.File
items for each file, null if no files are present.public static java.io.File getFile(java.io.File root, java.lang.String pathName)
File
pointing to the desired file, otherwise null.public static boolean exists(java.io.File root, java.lang.String pathName)
File
object.public static java.io.File[] getSortedList(java.io.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 java.io.File[] getSortedList(java.io.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 java.io.BufferedReader getReader(java.io.File root, java.lang.String pathName)
BufferedReader
for a file at the location of a File
object.BufferedReader
if file exists, otherwise null.public static java.io.BufferedReader getReader(java.lang.String pathName)
BufferedReader
for pathname string.BufferedReader
if file exists, otherwise null.Copyright © 2008-2018 Regents University of California. All Rights Reserved.