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
IOException
public abstract OutputStream create(String path) throws IOException
IOException
public abstract OutputStream create(String path, int blockSizeByte) throws IOException
IOException
public abstract OutputStream create(String path, short replication, int blockSizeByte) throws IOException
IOException
public abstract boolean delete(String path, boolean recursive) throws IOException
IOException
public abstract boolean exists(String path) throws IOException
IOException
public abstract String[] list(String path) throws IOException
path
- the path to list.IOException
public abstract List<String> getFileLocations(String path) throws IOException
IOException
public abstract List<String> getFileLocations(String path, long offset) throws IOException
IOException
public abstract long getFileSize(String path) throws IOException
IOException
public abstract long getBlockSizeByte(String path) throws IOException
IOException
public abstract long getModificationTimeMs(String path) throws IOException
IOException
public abstract long getSpace(String path, UnderFileSystem.SpaceType type) throws IOException
IOException
public abstract boolean isFile(String path) throws IOException
IOException
public abstract boolean mkdirs(String path, boolean createParent) throws IOException
IOException
public abstract InputStream open(String path) throws IOException
IOException
public abstract boolean rename(String src, String dst) throws IOException
IOException
public abstract void toFullPermission(String path) throws IOException
IOException
Copyright © 2014. All rights reserved.