@@ -91,12 +91,70 @@ or a file within the file system.
91
91
- :class: `<file-system-file-locator> `
92
92
- :class: `<file-system-directory-locator> `
93
93
94
+ .. graphviz ::
95
+ :caption: File system locator class diagram. Dashed boxes are
96
+ classes from module `locators `.
97
+
98
+ digraph G {
99
+ fontname="Arial,sans-serif";
100
+ node [shape=box, color=gray];
101
+
102
+ physical_locator [label="<physical-locator>\n oa", style=dashed];
103
+ file_locator [label="<file-locator>\n oa", style=dashed];
104
+ directory_locator [label="<directory-locator>\n oa",style=dashed];
105
+ file_system_locator [label="<file-system-locator>\n oa", style=bold, color="#17594A"];
106
+ file_system_file_locator [label="<file-system-file-locator>", style=bold, color="#17594A"];
107
+ file_system_directory_locator [label="<file-system-directory-locator>", style=bold, color="#17594A"];
108
+
109
+ physical_locator -> file_system_locator;
110
+ physical_locator -> directory_locator;
111
+ physical_locator -> file_locator;
112
+ file_system_locator -> file_system_file_locator;
113
+ file_locator -> file_system_file_locator;
114
+ file_system_locator -> file_system_directory_locator;
115
+ directory_locator -> file_system_directory_locator;
116
+ }
117
+
94
118
On Posix systems:
95
119
96
120
- :class: `<posix-file-system-locator> `
97
121
- :class: `<posix-directory-locator> `
98
122
- :class: `<posix-file-locator> `
99
123
124
+ .. graphviz ::
125
+ :caption: Posix file system hierarchy. Dashed boxes are classes
126
+ from module `locators `.
127
+
128
+ digraph G {
129
+ fontname="Arial,sans-serif";
130
+ node [shape=box, color=gray];
131
+
132
+ physical_locator [label="<physical-locator>\n oa", style=dashed] ;
133
+ directory_locator [label="<directory-locator>\n oa",style=dashed];
134
+
135
+ file_locator [label="<file-locator>\n oa", style=dashed];
136
+ file_system_locator [label="<file-system-locator>\n oa"];
137
+ file_system_file_locator [label="<file-system-file-locator>"];
138
+ file_system_directory_locator [label="<file-system-directory-locator>"] ;
139
+
140
+ posix_file_system_locator [label="<posix-file-system-locator>\n oas", style=bold, color="#17594A"];
141
+ posix_directory_locator [label="<posix-directory-locator>\n s", style=bold, color="#17594A"] ;
142
+ posix_file_locator [label="<posix-file-locator>\n s", style=bold, color="#17594A"]
143
+
144
+ physical_locator -> file_locator;
145
+ physical_locator -> file_system_locator;
146
+ physical_locator -> directory_locator;
147
+ directory_locator -> file_system_directory_locator;
148
+ file_locator -> file_system_file_locator;
149
+ file_system_locator -> file_system_file_locator;
150
+ file_system_locator -> file_system_directory_locator;
151
+ file_system_locator -> posix_file_system_locator;
152
+ file_system_directory_locator -> posix_directory_locator;
153
+ file_system_file_locator -> posix_file_locator;
154
+ posix_file_system_locator -> posix_directory_locator;
155
+ posix_file_system_locator -> posix_file_locator;
156
+ }
157
+
100
158
On Microsoft systems:
101
159
102
160
- :class: `<microsoft-server-locator> `
@@ -106,54 +164,61 @@ On Microsoft systems:
106
164
- :class: `<microsoft-directory-locator> `
107
165
- :class: `<microsoft-file-locator> `
108
166
167
+ .. graphviz ::
168
+ :caption: Microsoft file system hierarchy. Dashed boxes are classes
169
+ from module `locators `.
170
+
171
+ digraph G {
172
+ fontname="Arial,sans-serif";
173
+ node [shape=box, color=gray];
174
+
175
+ locator [label="<locator>\n oa",style=dashed];
176
+ physical_locator [label="<physical-locator>\n oa", style=dashed] ;
177
+ directory_locator [label="<directory-locator>\n oa",style=dashed];
178
+ server_locator [label="<server-locator>\n oa",style=dashed];
179
+
180
+ file_locator [label="<file-locator>\n oa", style=dashed];
181
+ file_system_locator [label="<file-system-locator>\n oa"];
182
+
183
+ microsoft_file_system_locator [label="<microsoft-file-system-locator>\n a", style=bold, color="#17594A"];
184
+ microsoft_server_locator [label="<microsoft-server-locator>\n as", style=bold, color="#17594A"];
185
+ microsoft_unc_locator [label="<microsoft-unc-locator>\n s", style=bold, color="#17594A"];
186
+ microsoft_volume_locator [label="<microsoft-volume-locator>\n s", style=bold, color="#17594A"];
187
+ microsoft_directory_locator [label="<microsoft-directory-locator>", style=bold, color="#17594A"];
188
+ microsoft_file_locator [label="<microsoft-file-locator>", style=bold, color="#17594A"];
189
+
190
+ locator -> server_locator;
191
+ locator -> physical_locator;
192
+ physical_locator -> file_locator;
193
+ physical_locator -> file_system_locator;
194
+ physical_locator -> directory_locator;
195
+ server_locator -> microsoft_server_locator;
196
+ directory_locator -> microsoft_directory_locator;
197
+ file_locator -> microsoft_file_locator;
198
+ file_system_locator -> microsoft_file_system_locator;
199
+ microsoft_file_system_locator -> microsoft_directory_locator;
200
+ microsoft_file_system_locator -> microsoft_file_locator;
201
+ microsoft_server_locator -> microsoft_unc_locator;
202
+ microsoft_server_locator -> microsoft_volume_locator;
203
+ }
204
+
205
+
109
206
Native locators, which are bound to the host platform:
110
207
111
208
- :const: `<native-file-system-locator> `
112
209
113
210
File streams
114
211
------------
115
212
116
- File streams are intended only for accessing the contents of files. More
117
- general file handling facilities, such as renaming, deleting, moving, and
118
- parsing directory names, are provided by the :doc: `file-system
119
- </system/file-system>` module. The :drm: `make ` method on :class: `<file-stream> `
120
- does not create direct instances of :class: `<file-stream> `, but instead an
121
- instance of a subclass determined by :gf: `type-for-file-stream `.
122
-
123
- make *file-stream-class *
124
-
125
- G.f method
126
-
127
- make <file-stream> #key locator: direction: if-exists:
128
- if-does-not-exist: buffer-size: element-type:
129
- asynchronous?: share-mode => *file-stream-instance *
213
+ File streams are intended only for accessing the contents of
214
+ files. More general file handling facilities, such as renaming,
215
+ deleting, moving, and parsing directory names, are provided by this
216
+ module.
130
217
131
- Creates and opens a stream over a file, and returns a new instance of a
132
- concrete subclass of :class: `<file-stream> ` that streams over the
133
- contents of the file referenced by *filename *. To determine the concrete
134
- subclass to be instantiated, this method calls the generic function
135
- :gf: `type-for-file-stream `.
136
-
137
- The ``locator: `` init-keyword should be a string naming a file. If the
138
- :doc: `Locators <../system/locators >` library is in use, *filename *
139
- should be an instance of :class: `<locator> ` or a string that can be
140
- coerced to one.
141
-
142
- The ``direction: `` init-keyword specifies the direction of the stream.
143
- This can be one of ``#"input" ``, ``#"output" ``, or ``#"input-output" ``.
144
- The default is ``#"input" ``.
145
-
146
- The ``if-exists: `` and ``if-does-not-exist: `` init-keywords specify actions
147
- to take if the file named by *filename * does or does not already exist
148
- when the stream is created. These init-keywords are discussed in more
149
- detail in `Options when creating file streams `_.
150
-
151
- The ``buffer-size: `` init-keyword can be used to suggest the size of a
152
- stream's buffer. See :class: `<buffered-stream> `.
153
-
154
- The ``element-type: `` init-keyword specifies the type of the elements in
155
- the file named by *filename *. See `Options when creating file
156
- streams `_ for more details.
218
+ The :drm: `make ` method on :class: `<file-stream> ` does not create
219
+ direct instances of :class: `<file-stream> `, but instead an instance of
220
+ a subclass determined by :gf: `type-for-file-stream `. See
221
+ `make `_ and `Options when creating file streams `_ below.
157
222
158
223
Options when creating file streams
159
224
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -854,6 +919,8 @@ File-System module.
854
919
Repeatedly follows symbolic links starting with *file * until it finds a
855
920
non-link file or directory, or a non-existent link target.
856
921
922
+ .. _make :
923
+
857
924
.. method :: make
858
925
:specializer: <file-stream>
859
926
@@ -862,7 +929,7 @@ File-System module.
862
929
:signature: make *file-stream-class * #key *filename * *direction * *if-exists * *if-does-not-exist * *buffer-size * *element-type * => *file-stream-instance *
863
930
864
931
:parameter file-stream-class: The class :class: `<file-stream> `.
865
- :parameter #key filename : An instance of :drm: `<object> `.
932
+ :parameter #key locator : An instance of :drm: `<object> `.
866
933
:parameter #key direction: One of ``#"input" ``, ``#"output" ``, or
867
934
``#"input-output" ``. The default is ``#"input" ``.
868
935
:parameter #key if-exists: One of :drm: `#f `, ``#"new-version" ``,
@@ -885,19 +952,20 @@ File-System module.
885
952
instantiated, this method calls the generic function
886
953
:gf: `type-for-file-stream `.
887
954
888
- The *filename * init-keyword should be a string naming a file. If
889
- the :doc: `Locators <../system/locators >` library is in use,
890
- *filename * should be an instance of :class: `<locator> ` or a string
891
- that can be coerced to one.
955
+ The *locator * init-keyword should be a :class: `<file-locator> ` or
956
+ a :drm: `<string> ` that can be coerced to one.
892
957
893
- The *direction * init-keyword specifies the direction of the stream.
958
+ The *direction * init-keyword specifies the direction of the
959
+ stream. This can be one of ``#"input" ``, ``#"output" ``, or
960
+ ``#"input-output" ``. The default is ``#"input" ``.
894
961
895
962
The *if-exists * and *if-does-not-exist * init-keywords specify
896
963
actions to take if the file named by *filename * does or does not
897
964
already exist when the stream is created. These init-keywords are
898
965
discussed in more detail in `Options when creating file streams `_.
899
966
900
- The *buffer-size * init-keyword is explained in :class: `<buffered-stream> `.
967
+ The *buffer-size * init-keyword can be used to suggest the size of
968
+ a stream's buffer. See :class: `<buffered-stream> `.
901
969
902
970
The *element-type * init-keyword specifies the type of the elements
903
971
in the file named by *filename *. This allows file elements to be
0 commit comments