|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.mucommander.desktop.AbstractTrash
com.mucommander.desktop.QueuedTrash
com.mucommander.desktop.windows.WindowsTrash
public class WindowsTrash
WindowsTrash is an AbstractTrash implementation for the Microsoft Windows' Recycle Bin.
Native methods in the Shell32 Windows API are used to access the Recycle Bin. There is an overhead associated with
invoking those methods (via JNA), so for performance reasons, this trash is implemented as a QueuedTrash
in order to group calls to QueuedTrash.moveToTrash(com.mucommander.file.AbstractFile).
WindowsTrashProvider| Field Summary |
|---|
| Fields inherited from class com.mucommander.desktop.QueuedTrash |
|---|
moveToTrashLock, moveToTrashThread, QUEUE_PERIOD |
| Constructor Summary | |
|---|---|
WindowsTrash()
|
|
| Method Summary | |
|---|---|
boolean |
canEmpty()
Implementation notes: always returns true: empty() is implemented. |
boolean |
canMoveToTrash(AbstractFile file)
Implementation notes: returns true only for local files that are not archive entries. |
boolean |
canOpen()
Implementation notes: always returns true: open() is implemented. |
boolean |
empty()
Attempts to empty this trash and returns true if it was successfully emptied. |
int |
getItemCount()
Implementation notes: returns the number of items for all Recycle Bins on all drives. |
boolean |
isTrashFile(AbstractFile file)
Implementation notes: always returns false. |
protected boolean |
moveToTrash(java.util.Vector queuedFiles)
Moves the AbstractFile instances contained in the given Vector to the trash. |
void |
open()
Opens the trash in the default file manager of the current OS/Desktop manager. |
| Methods inherited from class com.mucommander.desktop.QueuedTrash |
|---|
moveToTrash, waitForPendingOperations |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WindowsTrash()
| Method Detail |
|---|
public boolean canMoveToTrash(AbstractFile file)
true only for local files that are not archive entries.
canMoveToTrash in class AbstractTrashfile - the file to test
public boolean canEmpty()
true: empty() is implemented.
canEmpty in class AbstractTrashpublic boolean empty()
AbstractTrashtrue if it was successfully emptied.
empty in class AbstractTrashpublic boolean isTrashFile(AbstractFile file)
false.
isTrashFile in class AbstractTrashfile - the file to test
public int getItemCount()
getItemCount in class AbstractTrash-1 if this information is not availablepublic boolean canOpen()
true: open() is implemented.
canOpen in class AbstractTrashpublic void open()
AbstractTrash
open in class AbstractTrashprotected boolean moveToTrash(java.util.Vector queuedFiles)
QueuedTrashAbstractFile instances contained in the given Vector to the trash.
Returns true if all files were moved successfully.
moveToTrash in class QueuedTrashqueuedFiles - a Vector of AbstractFile to move to the trash
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard