https://mooseframework.inl.gov
Loading...
Searching...
No Matches
LockFile.h
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
3//*
4//* All rights reserved, see COPYRIGHT for full restrictions
5//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6//*
7//* Licensed under LGPL 2.1, please see LICENSE for details
8//* https://www.gnu.org/licenses/lgpl-2.1.html
9
10#pragma once
11
12#include <string>
13
23{
24public:
25 LockFile(const std::string & filename, bool do_lock = true);
26 ~LockFile();
27
28protected:
29 const bool _do_lock;
30 int _fd;
31 const std::string _filename;
32};
Gets an exclusive lock on a file.
Definition LockFile.h:23
int _fd
Definition LockFile.h:30
const std::string _filename
Definition LockFile.h:31
~LockFile()
Definition LockFile.C:32
const bool _do_lock
Definition LockFile.h:29