Dobby
3.0
Dobby “Docker based Thingy” is a tool for managing and running OCI containers using crun
|
Class that represents a reference count file. More...
#include <RefCountFile.h>
Public Member Functions | |
RefCountFile (std::string file) | |
bool | IsOpen () const |
const std::string & | GetFilePath () const |
void | Lock () |
void | Unlock () |
void | Reset () |
Reset the reference count in the file if it is not 0. | |
int | Increment () |
Increment the reference count in the file. | |
int | Decrement () |
Decrement the reference count in the file. | |
Private Member Functions | |
int | Read () |
Read the reference count file. More... | |
void | Close () |
Close the file descriptor if it's not already closed. | |
int | Write (int ref) |
Write the reference count to file. More... | |
Private Attributes | |
std::string | mFilePath |
int | mFd |
bool | mOpen |
Class that represents a reference count file.
This class is only intended to be used internally by Storage plugin do not use from external code.
|
private |
Read the reference count file.
|
private |
Write the reference count to file.