The TrashHandler class provides functionality to manage a "Trash" (virtual trash) for files and directories.
More...
#include <TrashHandler.h>
|
| static bool | emptyTrash () |
| | Empties the "Trash" by deleting all files and directories in the virtual trash. More...
|
| |
| static QString | getTrashPath () |
| | Retrieves the path to the "Trash" directory. More...
|
| |
| static bool | isEmpty () |
| | Checks if the "Trash" is empty. More...
|
| |
The TrashHandler class provides functionality to manage a "Trash" (virtual trash) for files and directories.
◆ TrashHandler()
| TrashHandler::TrashHandler |
( |
QWidget * |
parent = nullptr | ) |
|
Constructs a TrashHandler object.
- Parameters
-
| parent | The parent QWidget (optional). |
◆ emptyTrash()
| bool TrashHandler::emptyTrash |
( |
| ) |
|
|
static |
Empties the "Trash" by deleting all files and directories in the virtual trash.
- Returns
- True if the trash was emptied successfully, false otherwise.
◆ getTrashPath()
| QString TrashHandler::getTrashPath |
( |
| ) |
|
|
static |
Retrieves the path to the "Trash" directory.
- Returns
- The path to the trash directory.
◆ isEmpty()
| bool TrashHandler::isEmpty |
( |
| ) |
|
|
static |
Checks if the "Trash" is empty.
- Returns
- True if the trash is empty, false otherwise.
◆ moveToTrash()
| void TrashHandler::moveToTrash |
( |
const QStringList & |
paths | ) |
|
Moves files and directories to the "Trash" (virtual trash).
- Parameters
-
| paths | List of paths to files and directories to be moved to the trash. |
The documentation for this class was generated from the following files: