forked from WerWolv/ImHex-Patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfile.pat
More file actions
53 lines (36 loc) · 857 Bytes
/
file.pat
File metadata and controls
53 lines (36 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#pragma once
namespace std::file {
using Handle = s32;
enum Mode : u8 {
Read = 1,
Write = 2,
Create = 3
};
fn open(str path, Mode mode) {
return builtin::std::file::open(path, u32(mode));
};
fn close(Handle handle) {
builtin::std::file::close(handle);
};
fn read(Handle handle, u64 size) {
return builtin::std::file::read(handle, size);
};
fn write(Handle handle, str data) {
return builtin::std::file::write(handle, data);
};
fn seek(Handle handle, u64 offset) {
builtin::std::file::seek(handle, offset);
};
fn size(Handle handle) {
return builtin::std::file::size(handle);
};
fn resize(Handle handle, u64 size) {
builtin::std::file::resize(handle, size);
};
fn flush(Handle handle) {
builtin::std::file::remove(handle);
};
fn remove(Handle handle) {
builtin::std::file::remove(handle);
};
}