The C++ framework for developing highly scalable, high performance servers on Windows platforms.

CTempDirectory Class Reference
[RAII - Resource Acquisition Is Initialization]

Collaboration diagram for CTempDirectory:

List of all members.


Detailed Description

A class which wraps the operating system GetTempPath() API and which creates and removes temporary directories in a scope based style. Directories are created in the form: TEMP_PATH\prefix + "-" + time(0).

Public Types

enum  Flags {
  UseProcessId = 0x01, UseTime = 0x02, DefaultName = UseProcessId | UseTime, AllowShared = 0x10,
  RequireUnique = 0x00, Default = DefaultName | RequireUnique
}

Public Member Functions

 CTempDirectory (DWORD flags=Flags::Default)
 Create a temporary directory with the prefix "JETBYTE_TEMP".
 CTempDirectory (const Core::_tstring &prefix, DWORD flags=Flags::Default)
 Create a temporary directory with the specified prefix.
 CTempDirectory (const CTempDirectory &rhs)
 ~CTempDirectory ()
 Remove the contents of the directory and remove the directory.
CTempDirectoryoperator= (const CTempDirectory &rhs)
const Core::_tstringGetDirectoryName () const
 Return the directory name.
void RemoveContents () const
 Empty the directory.

Member Enumeration Documentation

enum Flags

Enumerator:
UseProcessId 
UseTime 
DefaultName 
AllowShared 
RequireUnique 
Default 


Constructor & Destructor Documentation

CTempDirectory ( DWORD  flags = Flags::Default  )  [explicit]

Create a temporary directory with the prefix "JETBYTE_TEMP".

CTempDirectory ( const Core::_tstring prefix,
DWORD  flags = Flags::Default 
) [explicit]

Create a temporary directory with the specified prefix.

CTempDirectory ( const CTempDirectory rhs  ) 

~CTempDirectory (  ) 

Remove the contents of the directory and remove the directory.


Member Function Documentation

CTempDirectory& operator= ( const CTempDirectory rhs  ) 

const _tstring & GetDirectoryName (  )  const

Return the directory name.

void RemoveContents (  )  const

Empty the directory.


Generated on Sun Sep 12 19:11:50 2021 for The Server Framework - v7.4 by doxygen 1.5.3