@@ -32,16 +32,25 @@ use crate::{Error, ErrorKind, Result};
3232///
3333/// All path passed to `FileIO` must be absolute path starting with scheme string used to construct `FileIO`.
3434/// 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` |
3544#[ derive( Clone , Debug ) ]
3645pub struct FileIO {
3746 inner : Arc < Storage > ,
3847}
3948
4049impl FileIO {
41- /// Try to infer file io scheme from path.
50+ /// Try to infer file io scheme from path. See [`FileIO`] for supported schemes.
4251 ///
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.
4554 ///
4655 /// Otherwise will return parsing error.
4756 pub fn from_path ( path : impl AsRef < str > ) -> crate :: Result < FileIOBuilder > {
@@ -111,6 +120,7 @@ pub struct FileIOBuilder {
111120
112121impl FileIOBuilder {
113122 /// Creates a new builder with scheme.
123+ /// See [`FileIO`] for supported schemes.
114124 pub fn new ( scheme_str : impl ToString ) -> Self {
115125 Self {
116126 scheme_str : Some ( scheme_str. to_string ( ) ) ,
0 commit comments