Back to index

nordugrid-arc-nox  1.1.0~rc6
FileLock.h
Go to the documentation of this file.
00001 // -*- indent-tabs-mode: nil -*-
00002 
00003 #ifndef __ARC_FILELOCK_H__
00004 #define __ARC_FILELOCK_H__
00005 
00006 #include <string>
00007 
00008 namespace Arc {
00009 
00010   class FileLock {
00011   public:
00012     FileLock(const std::string& filename);
00013     ~FileLock();
00014     operator bool();
00015     bool operator!();
00016   private:
00017     const std::string lockfile;
00018     int fd;
00019   };
00020 
00021 } // namespace Arc
00022 
00023 #endif