Arbiter  0.0.0
Public Member Functions | Friends | List of all members
arbiter::fs::LocalHandle Class Reference

A scoped local filehandle for a possibly remote path. More...

#include <arbiter/drivers/fs.hpp>

Public Member Functions

 ~LocalHandle ()
 Deletes the local path if the data was copied from a remote source. More...
 
std::string localPath () const
 Get the path of the locally stored file. More...
 
std::string release ()
 Release the managed local path and return the path from LocalHandle::localPath. More...
 

Friends

class arbiter::Arbiter
 

Detailed Description

A scoped local filehandle for a possibly remote path.

This is an RAII style pseudo-filehandle. It manages the scope of a local temporary version of a file, where that file may have been copied from a remote storage location.

See Arbiter::getLocalHandle for details about construction.

Constructor & Destructor Documentation

arbiter::fs::LocalHandle::~LocalHandle ( )

Deletes the local path if the data was copied from a remote source.

This is a no-op if the path was already local and not copied.

Member Function Documentation

std::string arbiter::fs::LocalHandle::localPath ( ) const
inline

Get the path of the locally stored file.

Returns
A local filesystem absolute path containing the data requested in Arbiter::getLocalHandle.
std::string arbiter::fs::LocalHandle::release ( )
inline

Release the managed local path and return the path from LocalHandle::localPath.

After this call, destruction of the LocalHandle will not erase the temporary file that may have been created.


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