public class Trash extends Configured
| 构造器和说明 |
|---|
Trash(Configuration conf)
Construct a trash can accessor.
|
Trash(FileSystem fs,
Configuration conf)
Construct a trash can accessor for the FileSystem provided.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
checkpoint()
Create a trash checkpoint.
|
void |
expunge()
Delete old checkpoints.
|
Runnable |
getEmptier()
Return a
Runnable that periodically empties the trash of all
users, intended to be run by the superuser. |
static void |
main(String[] args)
Run an emptier.
|
boolean |
moveToTrash(Path path)
Move a file or directory to the current trash directory.
|
getConf, setConfpublic Trash(Configuration conf) throws IOException
conf - a ConfigurationIOExceptionpublic Trash(FileSystem fs, Configuration conf) throws IOException
IOExceptionpublic boolean moveToTrash(Path path) throws IOException
IOExceptionpublic void checkpoint()
throws IOException
IOExceptionpublic void expunge()
throws IOException
IOExceptionpublic Runnable getEmptier() throws IOException
Runnable that periodically empties the trash of all
users, intended to be run by the superuser. Only one checkpoint is kept
at a time.IOExceptionCopyright © 2009 The Apache Software Foundation