Sha256: 7655ad396068f1dd6fd64094a9f3a824a1b179980019164b724535be8420fd7d
Contents?: true
Size: 580 Bytes
Versions: 20
Compression:
Stored size: 580 Bytes
Contents
use super::open_parent; use crate::fs::{access_unchecked, AccessType, FollowSymlinks, MaybeOwnedFile}; use std::path::Path; use std::{fs, io}; /// Implement `access` by `open`ing up the parent component of the path and /// then calling `access_unchecked` on the last component. pub(crate) fn access( start: &fs::File, path: &Path, type_: AccessType, follow: FollowSymlinks, ) -> io::Result<()> { let start = MaybeOwnedFile::borrowed(start); let (dir, basename) = open_parent(start, path)?; access_unchecked(&dir, basename.as_ref(), type_, follow) }
Version data entries
20 entries across 20 versions & 1 rubygems