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, setConf
public Trash(Configuration conf) throws IOException
conf
- a ConfigurationIOException
public Trash(FileSystem fs, Configuration conf) throws IOException
IOException
public boolean moveToTrash(Path path) throws IOException
IOException
public void checkpoint() throws IOException
IOException
public void expunge() throws IOException
IOException
public 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.IOException
Copyright © 2009 The Apache Software Foundation