@@ -8,15 +8,15 @@ json2dir — convert JSON objects to directory trees
88
99* json2dir* < _ file.json_
1010
11- # INPUT SCHEMA
11+ # CONVERSION SCHEME
1212
1313- Objects represent directories.
1414- Strings represent contents of files.
1515- Arrays are used to represent symlinks and executable files.
1616- Arrays of the form ` ["link", target] ` represent symlinks, second element representing the target of the symlink.
1717- Arrays of the form ` ["script", content] ` represent executable files, second representing the content of the script.
1818
19- # BUGS
19+ # CAVEATS
2020
2121Regular JSON constraints apply. In particular, the input must be UTF-8. Currently, there's no way to represent files containing non-UTF-8 content.
2222
@@ -26,7 +26,7 @@ When using this utility to create files for other users, care must be taken in o
2626
2727```
2828printf '%s' '{
29- "file ": "Hello, world!",
29+ "greeting ": "Hello, world!",
3030 "dir": {
3131 "subfile": "Content.\\n",
3232 "subdir": {}
@@ -36,7 +36,12 @@ printf '%s' '{
3636}' | json2dir
3737```
3838
39- Here, four files will be added to the current directory: ` file ` , ` dir ` , ` symlink ` , and ` script ` .
39+ The following files will be created:
40+
41+ - ` greeting ` : a regular file containing the text ` Hello, world! ` .
42+ - ` dir ` : a directory with two entries in it (` subfile ` and ` subdir ` ).
43+ - ` symlink ` : a symbolic link pointing to ` target path ` ,
44+ - ` script ` : an executable shell script that prints ` Howdy! ` when run.
4045
4146# SEE ALSO
4247
0 commit comments