-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfsrip_schema.graphql
126 lines (85 loc) · 2.79 KB
/
fsrip_schema.graphql
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# this is our graphql schema describing the types that fsrip emits
# some of our "flags" variables could be enums instead of list of strings
# type fsrip_timestamp {
# name: String!
# ts: String! # ISO 8601
#}
type timestamps {
accessed: String
backup: String # HFS+
created: String
deleted: String # Linux
fn_accessed: String # NTFS
fn_created: String # NTFS
fn_metadata: String # NTFS
fn_modified: String # NTFS
metadata: String
modified: String
}
# represents logical metadata of the attribute
# key: type prefix + hash(fsrip_stream)
type fsrip_stream {
id: Float!
flags: [String]!
type: Int!
name: String
size: Float!
data_id: String! # hash-based ID of data buffer
}
type fsrip_datarun {
offset: Float!
addr: Float!
len: Float!
flags: [String]! # maybe this could be an enum
}
# represents physical metadata of the attribute
# key: type prefix + hash(fsrip_attribute)
type fsrip_attribute {
stream: fsrip_stream
init_size: Float!
comp_size: Float!
# resident data
rd_buf: String
rd_buf_size: Float! # do we need this? we can infer length from rd_buf
# nonresident data
skip_len: Float!
alloc_size: Float!
nrds: [fsrip_datarun]
}
# key of fsrip_inode
# type prefix + logical hash of struct and attributes? (md5 yada yada)
type fsrip_inode {
addr: Float!
flags: [String]!
type: String!
attrs: [fsrip_attribute]!
timestamps: [fsrip_timestamp]!
uid: String # nullable??
gid: String # ditto?
mode: [String]! # tentative; look further into Windows to see how to represent ACLs
# here's a collection of stuff we have questions about
link: String # name of target file if symlink; not output by fsrip but this may be necessary
nlink: Int # do we care?
seq_num: Int # MFT sequence number
name2: String # only FAT and NTFS; may be a leaky abstraction
}
# key of fsrip_path
# type prefix + hash(path)
type fsrip_path {
path: String!
}
# key of fsrip_dirent
# there's local instability introduced by using the index, but it's local to the directory, instead of having global effect on key space
# hash based somehow... type prefix + ... + hash(parent_path) + varint(index in parent) + varint(addr)
# type prefix + parent path_id + hash(fsrip_dirent)
type fsrip_dirent {
type: String!
flags: [String]!
path_id: String! # hash of path in fsrip_path
streams: [String]! # fsrip_stream IDs
children: [String]! # IDs of child dirents (which are hashes, of course)
}
to-do:
filesystem structure -> root dirent, table/mapping of dirent IDs -> inodes?
filesystem hashes
partitioning of these things