LeechCraft  0.6.70-10870-g558588d6ec
Modular cross-platform feature rich live environment.
LeechCraft::Util::FileRemoveGuard Class Referencefinal

QFile removing itself from file system on destruction. More...

#include "fileremoveguard.h"

+ Inheritance diagram for LeechCraft::Util::FileRemoveGuard:
+ Collaboration diagram for LeechCraft::Util::FileRemoveGuard:

Public Member Functions

 FileRemoveGuard (const QString &path)
 Constructs this file with the given path. More...
 
virtual ~FileRemoveGuard ()
 Removes the file. More...
 

Detailed Description

QFile removing itself from file system on destruction.

Makes sure that the file represented by this object is removed when the corresponding instance of this class is destructed. Useful to automatically remove temporary files, for example.

Definition at line 46 of file fileremoveguard.h.

Constructor & Destructor Documentation

◆ FileRemoveGuard()

LeechCraft::Util::FileRemoveGuard::FileRemoveGuard ( const QString &  path)

Constructs this file with the given path.

Parameters
[in]pathThe file path to construct with.

Definition at line 37 of file fileremoveguard.cpp.

◆ ~FileRemoveGuard()

LeechCraft::Util::FileRemoveGuard::~FileRemoveGuard ( )
virtual

Removes the file.

Tries to close and remove the file represented by this object.

Definition at line 42 of file fileremoveguard.cpp.


The documentation for this class was generated from the following files: