You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[deferred_read.rs](deferred_read.rs): An example demonstrating the use of `DeferredRead` to defer reading file contents until they are needed.
31
+
32
+
## `DeferredReadOrOwn`
33
+
34
+
-[deferred_read_or_own.rs](deferred_read_or_own.rs): An example demonstrating the use of `DeferredReadOrOwn` to defer reading file contents and cache them.
35
+
36
+
## `DirChildren`
37
+
38
+
-[reading_dir_children.rs](reading_dir_children.rs): An example demonstrating the use of `DirChildren` to read dynamic directory contents.
39
+
-[writing_dir_children.rs](writing_dir_children.rs): An example demonstrating the use of `DirChildren` to write dynamic directory contents.
Copy file name to clipboardExpand all lines: dir-structure/examples/README.md
+10-32Lines changed: 10 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,17 @@ A collection of examples demonstrating various features of the `dir-structure` c
7
7
-[reading.rs](reading.rs): A simple example of reading a directory structure from disk.
8
8
-[writing.rs](writing.rs): A simple example of writing a directory structure to disk.
9
9
10
-
## `CleanDir`
10
+
## `resolve_path`
11
+
12
+
-[resolve_path.rs](resolve_path.rs): An example demonstrating the use of `resolve_path` to resolve paths within a directory structure.
13
+
14
+
## `load_path`
11
15
12
-
-[clean_dir.rs](clean_dir.rs): An example demonstrating the use of `CleanDir` to ensure a directory is clean before writing.
16
+
-[load_path.rs](load_path.rs): An example demonstrating the use of `load_path` to load a specific file from a path within a directory structure, without loading the entire structure.
13
17
14
-
## `data_formats::*`
18
+
## `dir-structure-tools`
15
19
16
-
-[json.rs](json.rs): An example demonstrating the use of `Json` to read and write JSON files.
17
-
-[json_pretty.rs](json_pretty.rs): An example demonstrating the use of `JsonPretty` to read and write pretty-printed JSON files.
18
-
-[toml.rs](toml.rs): An example demonstrating the use of `Toml` to read and write TOML files.
19
-
-[yaml.rs](yaml.rs): An example demonstrating the use of `Yaml` to read and write YAML files.
20
-
-[ron.rs](ron.rs): An example demonstrating the use of `Ron` to read and write RON files.
21
-
-[ron_pretty.rs](ron_pretty.rs): An example demonstrating the use of `RonPretty` to read and write pretty-printed RON files.
20
+
Also see [the examples in the `dir-structure-tools` crate](../../dir-structure-tools/examples/), which demonstrate more advanced features of the `dir-structure` crate.
22
21
23
22
## A note on the following examples
24
23
@@ -30,19 +29,6 @@ demonstrated in the examples below.
30
29
> A warning first: In order to understand the examples below, it is recommended to read the documentation for the
-[deferred_read.rs](deferred_read.rs): An example demonstrating the use of `DeferredRead` to defer reading file contents until they are needed.
36
-
37
-
## `DeferredReadOrOwn`
38
-
39
-
-[deferred_read_or_own.rs](deferred_read_or_own.rs): An example demonstrating the use of `DeferredReadOrOwn` to defer reading file contents and cache them.
40
-
41
-
## `DirChildren`
42
-
43
-
-[reading_dir_children.rs](reading_dir_children.rs): An example demonstrating the use of `DirChildren` to read dynamic directory contents.
44
-
-[writing_dir_children.rs](writing_dir_children.rs): An example demonstrating the use of `DirChildren` to write dynamic directory contents.
@@ -51,7 +37,7 @@ demonstrated in the examples below.
51
37
52
38
-[std_fs_vfs.rs](std_fs_vfs.rs): An example of reading / writing a directory structure from the actual file system using the `StdFsVfs`. Note that this is the default VFS used by `DirStructureItem::read` and `DirStructureItem::write`, so all the examples listed above use this VFS implicitly. This example is just to demonstrate the explicit use of the `StdFsVfs`.
53
39
54
-
#### `include_dir` VFS
40
+
<!--#### `include_dir` VFS
55
41
56
42
- [reading_from_include_dir_vfs.rs](reading_from_include_dir_vfs.rs): An example of reading a directory structure from an embedded file system using the `include_dir_vfs!` macro.
57
43
- [reading_dir_children_from_include_dir_vfs.rs](reading_dir_children_from_include_dir_vfs.rs): An example demonstrating the use of `DirChildren` to read dynamic directory contents from an embedded file system using the `include_dir_vfs!` macro.
@@ -62,7 +48,7 @@ Note that the `include_dir` VFS is read-only, so there are no writing examples.
62
48
63
49
- [reading_from_git_vfs.rs](reading_from_git_vfs.rs): An example of reading a directory structure from a git repository.
64
50
65
-
Note that the `git` VFS is read-only, so there are no writing examples.
51
+
Note that the `git` VFS is read-only, so there are no writing examples.-->
@@ -71,11 +57,3 @@ Note that the `git` VFS is read-only, so there are no writing examples.
71
57
-[reading_from_tokio_fs_vfs.rs](reading_from_tokio_fs_vfs.rs): An example of reading a directory structure from the actual file system using `TokioFsVfs`.
72
58
-[writing_to_tokio_fs_vfs.rs](writing_to_tokio_fs_vfs.rs): An example of writing a directory structure to the actual file system using `TokioFsVfs`.
73
59
74
-
75
-
## `resolve_path`
76
-
77
-
-[resolve_path.rs](resolve_path.rs): An example demonstrating the use of `resolve_path` to resolve paths within a directory structure.
78
-
79
-
## `load_path`
80
-
81
-
-[load_path.rs](load_path.rs): An example demonstrating the use of `load_path` to load a specific file from a path within a directory structure, without loading the entire structure.
0 commit comments