@@ -32,16 +32,25 @@ use crate::{Error, ErrorKind, Result};
32
32
///
33
33
/// All path passed to `FileIO` must be absolute path starting with scheme string used to construct `FileIO`.
34
34
/// For example, if you construct `FileIO` with `s3a` scheme, then all path passed to `FileIO` must start with `s3a://`.
35
+ ///
36
+ /// Supported storages:
37
+ ///
38
+ /// | Storage | Feature Flag | Schemes |
39
+ /// |--------------------|-------------------|------------|
40
+ /// | Local file system | `storage-fs` | `file` |
41
+ /// | Memory | `storage-memory` | `memory` |
42
+ /// | S3 | `storage-s3` | `s3`, `s3a`|
43
+ /// | GCS | `storage-gcs` | `gs` |
35
44
#[ derive( Clone , Debug ) ]
36
45
pub struct FileIO {
37
46
inner : Arc < Storage > ,
38
47
}
39
48
40
49
impl FileIO {
41
- /// Try to infer file io scheme from path.
50
+ /// Try to infer file io scheme from path. See [`FileIO`] for supported schemes.
42
51
///
43
- /// If it's a valid url, for example http ://example.org , url scheme will be used.
44
- /// If it's not a valid url, will try to detect if it's a file path.
52
+ /// - If it's a valid url, for example `s3 ://bucket/a` , url scheme will be used, and the rest of the url will be ignored .
53
+ /// - If it's not a valid url, will try to detect if it's a file path.
45
54
///
46
55
/// Otherwise will return parsing error.
47
56
pub fn from_path ( path : impl AsRef < str > ) -> crate :: Result < FileIOBuilder > {
@@ -111,6 +120,7 @@ pub struct FileIOBuilder {
111
120
112
121
impl FileIOBuilder {
113
122
/// Creates a new builder with scheme.
123
+ /// See [`FileIO`] for supported schemes.
114
124
pub fn new ( scheme_str : impl ToString ) -> Self {
115
125
Self {
116
126
scheme_str : Some ( scheme_str. to_string ( ) ) ,
0 commit comments