Auto merge of #39418 - redox-os:redox_fs_ext, r=brson
Add dev and ino to MetadataExt This adds .dev() and .ino() to MetadataExt on Redox
This commit is contained in:
commit
aed6410a7b
@ -160,6 +160,10 @@ impl OpenOptionsExt for OpenOptions {
|
|||||||
// casts and rely on manual lowering to `stat` if the raw type is desired.
|
// casts and rely on manual lowering to `stat` if the raw type is desired.
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
pub trait MetadataExt {
|
pub trait MetadataExt {
|
||||||
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
|
fn dev(&self) -> u64;
|
||||||
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
|
fn ino(&self) -> u64;
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
fn mode(&self) -> u32;
|
fn mode(&self) -> u32;
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
@ -184,6 +188,12 @@ pub trait MetadataExt {
|
|||||||
|
|
||||||
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
#[stable(feature = "metadata_ext", since = "1.1.0")]
|
||||||
impl MetadataExt for fs::Metadata {
|
impl MetadataExt for fs::Metadata {
|
||||||
|
fn dev(&self) -> u64 {
|
||||||
|
self.as_inner().as_inner().st_dev as u64
|
||||||
|
}
|
||||||
|
fn ino(&self) -> u64 {
|
||||||
|
self.as_inner().as_inner().st_ino as u64
|
||||||
|
}
|
||||||
fn mode(&self) -> u32 {
|
fn mode(&self) -> u32 {
|
||||||
self.as_inner().as_inner().st_mode as u32
|
self.as_inner().as_inner().st_mode as u32
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user