[go: up one dir, main page]

File: filesystems.xml

package info (click to toggle)
commons-vfs 1.0-5
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 2,452 kB
  • ctags: 3,357
  • sloc: java: 24,129; xml: 2,785; makefile: 15
file content (540 lines) | stat: -rw-r--r-- 14,860 bytes parent folder | download
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<document>

    <properties>
        <title>Supported File Systems</title>
        <author email="adammurdoch@apache.org">Adam Murdoch</author>
        <author email="imario@apache.org">Mario Ivankovits</author>
    </properties>

    <body>
        <section name="Supported File Systems">
            <p>Commons VFS currently supports the following file systems:</p>
            <ul>
                <li>
                    <a href="#FTP">FTP</a>
                </li>
                <li>
                    <a href="#Local Files">Local Files</a>
                </li>
                <li>
                    <a href="#HTTP and HTTPS">HTTP and HTTPS</a>
                </li>
                <li>
                    <a href="#SFTP">SFTP</a>
                </li>
                <li>
                    <a href="#Temporary Files">Temporary Files</a>
                </li>
                <li>
                    <a href="#Zip, Jar and Tar">Zip, Jar and Tar (uncompressed, tgz or tbz2)</a>
                </li>
                <li>
                    <a href="#gzip and bzip2">gzip and bzip2</a>
                </li>
                <li>
                    <a href="#res">res</a>
                </li>
                <li>
                    <a href="#ram">ram</a>
                </li>
			</ul>
        </section>

		<section name="Things from the sandbox">
			<p>The following file systems are in development:</p>
			<ul>
				<li>
					<a href="#WebDAV">WebDAV</a><br />
					We can't release WebDAV as we depend on an snapshot, thus it is in our sandbox.
				</li>
				<li>
					<a href="#CIFS">CIFS</a>
				</li>
				<li>
					<a href="#mime">mime</a>
				</li>
			</ul>
		</section>

		<section name="Naming">

            <p>All filenames are treated as URIs. One of the consequences of this is you have to encode the '%'
                character using <code>%25</code>. <br />
                Depending on the filesystem additional characters are encoded if needet. This is done automatically, but
                might be reflected in the filename.
                </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>file:///somedir/some%25file.txt</code>
                </li>
            </ul>

        </section>

        <section name="Local Files">

            <p>Provides access to the files on the local physical file system.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>[file://]
                    <i>absolute-path</i>
                </code>
            </p>

            <p>
                Where
                <code>
                    <i>absolute-path</i>
                </code> is a valid absolute
                file name for the local platform.  UNC names are supported
                under Windows.
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>file:///home/someuser/somedir</code>
                </li>
                <li>
                    <code>file://C:/Documents and Settings</code>
                </li>
                <li>
                    <code>file:////somehost/someshare/afile.txt</code>
                </li>
                <li>
                    <code>/home/someuser/somedir</code>
                </li>
                <li>
                    <code>c:\program files\some dir</code>
                </li>
                <li>
                    <code>c:/program files/some dir</code>
                </li>
            </ul>
        </section>

        <section name="Zip, Jar and Tar">

            <p>Provides read-only access to the contents of Zip, Jar and Tar files.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>zip://
                    <i>arch-file-uri</i>[!
                    <i>absolute-path</i>]
                </code>
            </p>
            <p>
                <code>jar://
                    <i>arch-file-uri</i>[!
                    <i>absolute-path</i>]
                </code>
            </p>
            <p>
                <code>tar://
                    <i>arch-file-uri</i>[!
                    <i>absolute-path</i>]
                </code>
            </p>
            <p>
                <code>tgz://
                    <i>arch-file-uri</i>[!
                    <i>absolute-path</i>]
                </code>
            </p>
            <p>
                <code>tbz2://
                    <i>arch-file-uri</i>[!
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                Where
                <code>arch-file-uri</code> refers to a file of any
                supported type, including other zip files.  Note: if you would like
                to use the ! as normal character it must be escaped
                using <code>%21</code>.<br />
                <code>tgz</code> and <code>tbz2</code> are convenience for <code>tar:gz</code> and <code>tar:bz2</code>.
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>jar:../lib/classes.jar!/META-INF/manifest.mf</code>
                </li>
                <li>
                    <code>zip:http://somehost/downloads/somefile.zip</code>
                </li>
                <li>
                    <code>jar:zip:outer.zip!/nested.jar!/somedir</code>
                </li>
                <li>
                    <code>jar:zip:outer.zip!/nested.jar!/some%21dir</code>
                </li>
                <li>
                    <code>tar:gz:http://anyhost/dir/mytar.tar.gz!/mytar.tar!/path/in/tar/README.txt</code>
                </li>
                <li>
                    <code>tgz:file://anyhost/dir/mytar.tgz!/somepath/somefile</code>
                </li>
            </ul>

        </section>

        <section name="gzip and bzip2">

            <p>Provides read-only access to the contents of gzip and bzip2 files.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>gz://
                    <i>compressed-file-uri</i>
                </code>
            </p>
            <p>
                <code>bz2://
                    <i>compressed-file-uri</i>
                </code>
            </p>

            <p>
                Where
                <code>compressed-file-uri</code> refers to a file of any
                supported type. There is no need to add a ! part to the uri if
                you read the content of the file you always will get the uncompressed
                version.
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>gz:/my/gz/file.gz</code>
                </li>
            </ul>

        </section>

        <section name="HTTP and HTTPS">

            <p>Provides access to files on an HTTP server.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>http://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>
            <p>
                <code>https://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>http://somehost:8080/downloads/somefile.jar</code>
                </li>
                <li>
                    <code>http://myusername@somehost/index.html</code>
                </li>
            </ul>
        </section>

        <section name="WebDAV">

            <p>Provides access to files on a WebDAV server.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>webdav://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>webdav://somehost:8080/dist</code>
                </li>
            </ul>
        </section>

        <section name="FTP">

            <p>Provides access to the files on an FTP server.</p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>ftp://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>ftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz</code>
                </li>
            </ul>

        </section>

        <section name="SFTP">

            <p>
                Provides access to the files on an SFTP server (that is, an SSH
                or SCP server).
            </p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>sftp://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>
            <ul>
                <li>
                    <code>sftp://myusername:mypassword@somehost/pub/downloads/somefile.tgz</code>
                </li>
            </ul>

        </section>

        <section name="CIFS">

            <p>
                Provides access to the files on a CIFS server, such as
                a Samba server, or a Windows share.
            </p>
            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>smb://[
                    <i>username</i>[:
                    <i>password</i>]@]
                    <i>hostname</i>[:
                    <i>port</i>][
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>

            <ul>
                <li>
                    <code>smb://somehost/home</code>
                </li>
            </ul>

        </section>

        <section name="Temporary Files">

            <p>
                Provides access to a temporary file system, or scratchpad,
                that is deleted when Commons VFS shuts down.  The temporary file
                system is backed by a local file system.
            </p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>tmp://[
                    <i>absolute-path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>

            <ul>
                <li>
                    <code>tmp://dir/somefile.txt</code>
                </li>
            </ul>
        </section>

        <section name="res">

            <p>
                This is not really a filesystem, it just tries to lookup a resource using javas <code>ClassLoader.getResource()</code>
                and creates a VFS url for further processing.
            </p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>res://[
                    <i>path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>

            <ul>
                <li>
                    <code>res:path/in/classpath/image.png</code><br/>
                    might result in
                    <code>jar:file://my/path/to/images.jar!/path/in/classpath/image.png</code><br/>
                </li>
            </ul>
        </section>

        <section name="ram">

            <p>
            	A filesystem which stores all the data in memory.
            	You can configure the max size and a predicate (FileSelector). The predicate will be used to check if
            	it is allowed to add a given file.
            </p>

            <p>
                <b>URI Format</b>
            </p>

            <p>
                <code>ram://[
                    <i>path</i>]
                </code>
            </p>

            <p>
                <b>Examples</b>
            </p>

            <ul>
                <li>
                    <code>ram:///any/path/to/file.txt</code>
                </li>
            </ul>
        </section>
        
		<section name="mime">

			<p>
				This filesystem can read mails and its attachements like archives.<br />
				If a part in the parsed mail has no name, a dummy name will be generated.
				The dummy name is: _body_part_X where X will be replaced by the part number. 
			</p>

			<p>
				<b>URI Format</b>
			</p>

			<p>
				<code>mime://
					<i>mime-file-uri</i>[!
					<i>absolute-path</i>]
				</code>
			</p>

			<p>
				<b>Examples</b>
			</p>

			<ul>
				<li>
					<code>mime:file:///your/path/mail/anymail.mime!/</code>
				</li>
				<li>
					<code>mime:file:///your/path/mail/anymail.mime!/filename.pdf</code>
				</li>
				<li>
					<code>mime:file:///your/path/mail/anymail.mime!/_body_part_0</code>
				</li>
			</ul>
		</section>

	</body>
</document>