Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/aienux/blob/main/vendor/uefi/src/fs/path/mod.rs # aienux Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `aienux / vendor / uefi / src / fs / path / mod.rs` 53 lines ยท 1518 bytes Raw Blame History 1 // SPDX-License-Identifier: MIT OR Apache-2.0 2 3 //! This module offers the [`Path`] and [`PathBuf`] abstractions. 4 //! 5 //! # Interoperability with Rust Strings 6 //! 7 //! To use Rust strings - `String` and `str` - with this API, first convert them 8 //! to [`CString16`] or [`CStr16`]. Rust strings do not directly convert to 9 //! [`Path`] or [`PathBuf`]. 10 //! 11 //! # Path Structure 12 //! 13 //! Paths use the [`SEPARATOR`] character as separator. Paths are absolute and 14 //! do not contain `.` or `..` components. However, this can be implemented in 15 //! the future. 16 //! 17 //! [`CString16`]: uefi::data_types::CString16 18 19 mod path; 20 mod pathbuf; 21 mod validation; 22 23 pub use path::{Components, Path}; 24 pub use pathbuf::PathBuf; 25 26 use crate::data_types::chars::NUL_16; 27 use crate::{CStr16, Char16, char16, cstr16}; 28 pub use validation::PathError; 29 pub(super) use validation::validate_path; 30 31 /// The default separator for paths. 32 pub const SEPARATOR: Char16 = char16!('\\'); 33 34 /// Stringified version of [`SEPARATOR`]. 35 pub const SEPARATOR_STR: &CStr16 = cstr16!("\\"); 36 37 /// Deny list of characters for path components. UEFI supports FAT-like file 38 /// systems. According to , 39 /// paths should not contain these symbols. 40 pub const CHARACTER_DENY_LIST: [Char16; 10] = { 41 [ 42 NUL_16, 43 char16!('"'), 44 char16!('*'), 45 char16!('/'), 46 char16!(':'), 47 char16!('<'), 48 char16!('>'), 49 char16!('?'), 50 SEPARATOR, 51 char16!('|'), 52 ] 53 };