mirror of
https://github.com/QRouland/UTPass.git
synced 2026-01-11 03:46:58 +00:00
Ensure that key and zip are deleted after import
This commit is contained in:
@@ -34,9 +34,8 @@ signals:
|
||||
|
||||
/**
|
||||
* @brief Emitted when the unzipping operation fails.
|
||||
* @param message The error message describing the failure.
|
||||
*/
|
||||
void unzipFailed(QString message);
|
||||
void unzipFailed();
|
||||
|
||||
private:
|
||||
std::unique_ptr<QSemaphore> m_sem; /**< Semaphore for managing concurrent operations. */
|
||||
@@ -48,19 +47,14 @@ public:
|
||||
Utils();
|
||||
|
||||
/**
|
||||
* @brief Unzips a ZIP file to the specified output directory.
|
||||
*
|
||||
* This method extracts the contents of a ZIP file from the specified URL and saves them to the provided
|
||||
* output directory path.
|
||||
* @brief Start a job to unzips a ZIP file to the specified output directory.
|
||||
*
|
||||
* @param zip_url The URL of the ZIP file to unzip.
|
||||
* @param dir_out The output directory where the contents of the ZIP file should be extracted.
|
||||
* @return `true` if the unzipping operation was successful, `false` otherwise.
|
||||
* @return `true` if the unzipping job is started successfullly, `false` otherwise.
|
||||
*/
|
||||
Q_INVOKABLE bool unzip(QUrl zip_url, QString dir_out);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Retrieves the path to the manifest data.
|
||||
*
|
||||
@@ -70,6 +64,22 @@ public:
|
||||
*/
|
||||
Q_INVOKABLE QString manifestPath();
|
||||
|
||||
/**
|
||||
* @brief Removes a file located at the specified URL.
|
||||
*
|
||||
* @param file_url The URL of the file to remove.
|
||||
* @return `true` if the file was successfully removed; `false` otherwise.
|
||||
*/
|
||||
Q_INVOKABLE bool rmFile(QUrl file_url);
|
||||
|
||||
/**
|
||||
* @brief Removes a directory located at the specified URL.
|
||||
*
|
||||
* @param dir_url The URL of the directory to remove.
|
||||
* @return `true` if the directory was successfully removed; `false` otherwise.
|
||||
*/
|
||||
Q_INVOKABLE bool rmDir(QUrl dir_url);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user