public abstract class UnderFileSystem extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
UnderFileSystem.SpaceType |
| Constructor and Description |
|---|
UnderFileSystem() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
close() |
abstract OutputStream |
create(String path) |
abstract OutputStream |
create(String path,
int blockSizeByte) |
abstract OutputStream |
create(String path,
short replication,
int blockSizeByte) |
abstract boolean |
delete(String path,
boolean recursive) |
abstract boolean |
exists(String path) |
static UnderFileSystem |
get(String path) |
abstract long |
getBlockSizeByte(String path) |
abstract List<String> |
getFileLocations(String path) |
abstract List<String> |
getFileLocations(String path,
long offset) |
abstract long |
getFileSize(String path) |
abstract long |
getModificationTimeMs(String path) |
abstract long |
getSpace(String path,
UnderFileSystem.SpaceType type) |
abstract boolean |
isFile(String path) |
abstract String[] |
list(String path)
List all the files in the folder.
|
abstract boolean |
mkdirs(String path,
boolean createParent) |
abstract InputStream |
open(String path) |
abstract boolean |
rename(String src,
String dst) |
abstract void |
toFullPermission(String path) |
public static UnderFileSystem get(String path)
public abstract void close()
throws IOException
IOExceptionpublic abstract OutputStream create(String path) throws IOException
IOExceptionpublic abstract OutputStream create(String path, int blockSizeByte) throws IOException
IOExceptionpublic abstract OutputStream create(String path, short replication, int blockSizeByte) throws IOException
IOExceptionpublic abstract boolean delete(String path, boolean recursive) throws IOException
IOExceptionpublic abstract boolean exists(String path) throws IOException
IOExceptionpublic abstract String[] list(String path) throws IOException
path - the path to list.IOExceptionpublic abstract List<String> getFileLocations(String path) throws IOException
IOExceptionpublic abstract List<String> getFileLocations(String path, long offset) throws IOException
IOExceptionpublic abstract long getFileSize(String path) throws IOException
IOExceptionpublic abstract long getBlockSizeByte(String path) throws IOException
IOExceptionpublic abstract long getModificationTimeMs(String path) throws IOException
IOExceptionpublic abstract long getSpace(String path, UnderFileSystem.SpaceType type) throws IOException
IOExceptionpublic abstract boolean isFile(String path) throws IOException
IOExceptionpublic abstract boolean mkdirs(String path, boolean createParent) throws IOException
IOExceptionpublic abstract InputStream open(String path) throws IOException
IOExceptionpublic abstract boolean rename(String src, String dst) throws IOException
IOExceptionpublic abstract void toFullPermission(String path) throws IOException
IOExceptionCopyright © 2014. All rights reserved.