1pub struct FileEngine {
5 default_options: EngineOptions,
6}
7
8#[derive(Debug, Clone)]
9pub struct EngineOptions {
10 pub buffer_size: usize,
11 pub follow_symlinks: bool,
12}
13
14impl Default for EngineOptions {
15 fn default() -> Self {
16 Self {
17 buffer_size: 1024 * 1024,
18 follow_symlinks: false,
19 }
20 }
21}
22
23impl FileEngine {
24 pub fn new() -> Self {
25 Self {
26 default_options: EngineOptions::default(),
27 }
28 }
29
30 pub fn with_options(options: EngineOptions) -> Self {
31 Self {
32 default_options: options,
33 }
34 }
35
36 pub fn options(&self) -> &EngineOptions {
37 &self.default_options
38 }
39}
40
41impl Default for FileEngine {
42 fn default() -> Self {
43 Self::new()
44 }
45}
46
47