Sha256: ccbe2bdd666304aa9ce261bf6a09a903acdd893c0c436181d2293859623004c9
Contents?: true
Size: 611 Bytes
Versions: 13
Compression:
Stored size: 611 Bytes
Contents
use crate::fs::{manually, FollowSymlinks, ImplMetadataExt, Metadata}; use rustix::fs::{statat, AtFlags}; use std::path::Path; use std::{fs, io}; pub(crate) fn stat_impl( start: &fs::File, path: &Path, follow: FollowSymlinks, ) -> io::Result<Metadata> { if !super::beneath_supported() { return manually::stat(start, path, follow); } let flags = AtFlags::RESOLVE_BENEATH | if follow == FollowSymlinks::Yes { AtFlags::empty() } else { AtFlags::SYMLINK_NOFOLLOW }; Ok(ImplMetadataExt::from_rustix(statat(start, path, flags)?)) }
Version data entries
13 entries across 13 versions & 1 rubygems