acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
file_lock.h
1// Created by camilo on 2021-08-12 02:25 BRT <3ThomasBorregaardSorensen!!
2#pragma once
3
4
5
6
7
8namespace file_lock
9{
10
11
12 class CLASS_DECL_ACME file_lock
13 {
14 public:
15
16
17 ::i32 m_iFileDescriptor;
18 ::string m_strName;
19 ::string m_strPath;
20
21
22 file_lock();
23 file_lock(const ::scoped_string & scopedstrName);
24 ~file_lock();
25
26
27 bool set_name(const ::scoped_string & scopedstrName);
28
29
30 bool is_active();
31 bool lock();
32 bool unlock();
33
34
35 bool create_file();
36 bool close_file();
37
38
39 static string _get_file_name(const_char_pointer pszName);
40
41
42 };
43
44
45} // namespace file_lock
46
47
48