Interface Trash
-
- All Known Implementing Classes:
TrashImpl
public interface Trash
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description File
getTrashDirectory(String trashDirName)
File
moveToTrash(File dir, String trashDirName)
Moves the specified dir to trash using the given trashDirName.void
removeFromTrash(String trashDirName)
Removes directory with the specified name from the trash.
-
-
-
Method Detail
-
moveToTrash
@Nullable File moveToTrash(@NotNull File dir, @NotNull String trashDirName) throws IOException
Moves the specified dir to trash using the given trashDirName.- Parameters:
dir
- dir to movetrashDirName
- directory name to use under the trash dir- Returns:
- resulting trash directory or null if directory specified as a first argument does not exist
- Throws:
IOException
- if move fails or trash dir cannot be created
-
removeFromTrash
void removeFromTrash(@NotNull String trashDirName)
Removes directory with the specified name from the trash.- Parameters:
trashDirName
- directory name in trash
-
-