Class Listing
- java.lang.Object
-
- edu.wisc.library.ocfl.core.storage.common.Listing
-
public class Listing extends Object
The result of a storage list operation
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classListing.Type
-
Constructor Summary
Constructors Constructor Description Listing(Listing.Type type, String relativePath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Listingdirectory(String relativePath)Creates a directory listing.booleanequals(Object o)static Listingfile(String relativePath)Creates a file listing.StringgetRelativePath()Listing.TypegetType()inthashCode()booleanisDirectory()booleanisFile()booleanisOther()static Listingother(String relativePath)Creates a listing for a file that is neither a regular file nor directory, such as a symbolic link.StringtoString()
-
-
-
Constructor Detail
-
Listing
public Listing(Listing.Type type, String relativePath)
-
-
Method Detail
-
file
public static Listing file(String relativePath)
Creates a file listing. The path MUST use forward slashes as path separators.- Parameters:
relativePath- relative path to the file- Returns:
- file listing
-
directory
public static Listing directory(String relativePath)
Creates a directory listing. The path MUST use forward slashes as path separators.- Parameters:
relativePath- relative path to the directory- Returns:
- directory listing
-
other
public static Listing other(String relativePath)
Creates a listing for a file that is neither a regular file nor directory, such as a symbolic link. The path MUST use forward slashes as path separators.- Parameters:
relativePath- relative path to the file- Returns:
- file listing
-
getRelativePath
public String getRelativePath()
- Returns:
- the path to the file/directory relative the list operation path
-
getType
public Listing.Type getType()
- Returns:
- the type of file
-
isFile
public boolean isFile()
-
isDirectory
public boolean isDirectory()
-
isOther
public boolean isOther()
-
-