Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefScopedTempDir

   in cef_scoped_temp_dir.h

class CefScopedTempDir

An object representing a temporary / scratch directory that should be cleaned up (recursively) when this object goes out of scope. Note that since deletion occurs during the destructor, no further error handling is possible if the directory fails to be deleted. As a result, deletion is not guaranteed by this class. Multiple calls to the methods which establish a temporary directory (CreateUniqueTempDir, CreateUniqueTempDirUnderPath, and Set) must have intervening calls to Delete or Take, or the calls will fail.


Constructor Summary
CefScopedTempDir()
          No directory is owned/created initially.
~CefScopedTempDir()
          Recursively delete path.
 
Method Summary
 bool CreateUniqueTempDir() WARN_UNUSED_RESULT
          Creates a unique directory in TempPath, and takes ownership of it.
 bool CreateUniqueTempDirUnderPath( const CefString& path ) WARN_UNUSED_RESULT
          Creates a unique directory under a given path, and takes ownership of it.
 bool Delete() WARN_UNUSED_RESULT
          Deletes the temporary directory wrapped by this object.
 const CefString& GetPath() const
          Returns the path to the created directory.
 bool IsEmpty() const
          Returns true if path_ is empty.
 bool IsValid() const
          Returns true if path_ is non-empty and exists.
 bool Set( const CefString& path ) WARN_UNUSED_RESULT
          Takes ownership of directory at |path|, creating it if necessary.
 CefString Take()
          Caller takes ownership of the temporary directory so it won't be destroyed when this object goes out of scope.
 

Constructor Detail

CefScopedTempDir

public CefScopedTempDir();
No directory is owned/created initially.

~CefScopedTempDir

public ~CefScopedTempDir();
Recursively delete path.


Method Detail

CreateUniqueTempDir

public bool CreateUniqueTempDir() WARN_UNUSED_RESULT;
Creates a unique directory in TempPath, and takes ownership of it. See file_util::CreateNewTemporaryDirectory.

CreateUniqueTempDirUnderPath

public bool CreateUniqueTempDirUnderPath( const CefString& path ) WARN_UNUSED_RESULT;
Creates a unique directory under a given path, and takes ownership of it.

Delete

public bool Delete() WARN_UNUSED_RESULT;
Deletes the temporary directory wrapped by this object.

GetPath

public const CefString& GetPath() const;
Returns the path to the created directory. Call one of the CreateUniqueTempDir* methods before getting the path.

IsEmpty

public bool IsEmpty() const;
Returns true if path_ is empty.

IsValid

public bool IsValid() const;
Returns true if path_ is non-empty and exists.

Set

public bool Set( const CefString& path ) WARN_UNUSED_RESULT;
Takes ownership of directory at |path|, creating it if necessary. Don't call multiple times unless Take() has been called first.

Take

public CefString Take();
Caller takes ownership of the temporary directory so it won't be destroyed when this object goes out of scope.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt