Interface Trash

  • All Known Implementing Classes:
    TrashImpl

    public interface 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 move
        trashDirName - 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
      • getTrashDirectory

        @NotNull
        File getTrashDirectory​(@NotNull
                               String trashDirName)