LibPkg
|
A class for automatically creating and deleting directories. More...
#include <auto_dir.h>
Public Member Functions | |
auto_dir () | |
Construct auto-directory object. More... | |
~auto_dir () | |
Destroy auto-directory object. More... | |
void | operator() (const string &pathname) |
Move to new pathname. More... | |
A class for automatically creating and deleting directories.
When an object of this class moves to a given pathname, it creates any directories needed to reach that pathname. When it leaves a pathname, it deletes any directories that are no longer in use.
pkg::auto_dir::auto_dir | ( | ) |
Construct auto-directory object.
The initial pathname is the empty string.
pkg::auto_dir::~auto_dir | ( | ) |
Destroy auto-directory object.
Any empty directories that contain the pathname are deleted.
void pkg::auto_dir::operator() | ( | const string & | pathname | ) |
Move to new pathname.
Any empty directories that contain the old pathname are deleted. Any directories needed to reach the new pathname are created.
pathname | the new pathname |
References pkg::os::OS_File17(), pkg::os::OS_File6(), and pkg::os::OS_File8().
Reference Manual | LibPkg | Version 0.9.0 (4 Sep 2020) |