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
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright the Vortex contributors
//! A filesystem abstraction for discovering and opening Vortex files.
//!
//! [`FileSystem`] provides a storage-agnostic interface for listing files under a prefix
//! and opening them for reading. Implementations can target local filesystems, object stores,
//! or any other storage backend.
use Debug;
use Arc;
use async_trait;
use BoxStream;
use VortexResult;
use crateVortexReadAt;
/// A file discovered during listing, with its path and optional size in bytes.
/// A reference-counted handle to a file system.
pub type FileSystemRef = ;
/// A storage-agnostic filesystem interface for discovering and reading Vortex files.
///
/// Implementations handle the details of a particular storage backend (local disk, S3, GCS, etc.)
/// while consumers work through this uniform interface.
///
/// # Paths
///
/// Path strings are *literal* object keys / file paths: the characters are used verbatim, with no
/// shell-style `~` expansion (`~` is a literal tilde, not the home directory) and no
/// percent-encoding or -decoding applied by this layer (`%20` is the three characters `%`, `2`,
/// `0`, not a space). A path produced by [`list`](FileSystem::list) or [`head`](FileSystem::head)
/// is the object's actual key, so it can be passed straight back to
/// [`open_read`](FileSystem::open_read) — including when it contains characters such as `~`, `%`,
/// `[`, `]`, or `#`.
///
/// # Future Work
///
/// An `open_write` method will be added once [`VortexWrite`](crate::VortexWrite) is
/// object-safe (it currently uses `impl Future` return types which prevent trait-object usage).