Skip to content

Commit 3975f7d

Browse files
authored
Have cap-fs-ext re-export OpenOptionsExt and MetadataExt. (#359)
* Have `cap-fs-ext` re-export `OpenOptionsExt` and `MetadataExt`. Since cap-fs-ext is already re-exporting `OpenOptions` and `Metadata`, now that `OpenOptionsExt` and `MetadataExt` are custom traits instead of std traits, re-export them so users can use them with `OpenOptions` and `Metadata`. * Rename `MetadataExt` to avoid name conflicts.
1 parent c3e03fd commit 3975f7d

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cap-fs-ext/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ pub use open_options_sync_ext::OpenOptionsSyncExt;
3636
pub use reopen::Reopen;
3737

3838
/// Re-export these to allow them to be used with `Reuse`.
39-
pub use cap_primitives::fs::{FollowSymlinks, Metadata, OpenOptions};
39+
pub use cap_primitives::fs::{
40+
FollowSymlinks, Metadata, MetadataExt as OsMetadataExt, OpenOptions, OpenOptionsExt,
41+
};
4042

4143
#[doc(hidden)]
4244
pub use cap_primitives::ambient_authority_known_at_compile_time;

cap-primitives/src/fs/metadata.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ pub trait MetadataExt {
261261
}
262262

263263
/// Windows-specific extensions to [`Metadata`].
264+
///
265+
/// This corresponds to [`std::os::windows::fs::MetadataExt`].
264266
#[cfg(windows)]
265267
pub trait MetadataExt {
266268
/// Returns the value of the `dwFileAttributes` field of this metadata.

0 commit comments

Comments
 (0)