https://mooseframework.inl.gov
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 
22 class LockFile
23 {
24 public:
25  LockFile(const std::string & filename, bool do_lock = true);
26  ~LockFile();
27 
28 protected:
29  const bool _do_lock;
30  int _fd;
31  const std::string _filename;
32 };
const std::string _filename
Definition: LockFile.h:31
int _fd
Definition: LockFile.h:30
const bool _do_lock
Definition: LockFile.h:29
~LockFile()
Definition: LockFile.C:32
Gets an exclusive lock on a file.
Definition: LockFile.h:22
LockFile(const std::string &filename, bool do_lock=true)
Definition: LockFile.C:16