pub struct ResourceLocator { /* private fields */ }Expand description
资源定位器,维护 OFD 容器内的当前工作目录路径。
对应 Java: org.ofdrw.reader.ResourceLocator
提供 cd(切换目录)、pwd(打印当前目录)、save/restore
(保存/恢复目录栈)等操作,用于在 OFD ZIP 归档内构建绝对路径。
Implementations§
Source§impl ResourceLocator
impl ResourceLocator
Sourcepub fn to_absolute_path(&self, path: &str) -> String
pub fn to_absolute_path(&self, path: &str) -> String
将路径转换为绝对路径。
对应 Java: ResourceLocator.toAbsolutePath(String)
Sourcepub fn get_abs_to(&self, path: &str) -> String
pub fn get_abs_to(&self, path: &str) -> String
获取以当前路径为基础的容器内绝对路径。
对应 Java: ResourceLocator.getAbsTo(ST_Loc)
Trait Implementations§
Source§impl Clone for ResourceLocator
impl Clone for ResourceLocator
Source§fn clone(&self) -> ResourceLocator
fn clone(&self) -> ResourceLocator
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResourceLocator
impl Debug for ResourceLocator
Auto Trait Implementations§
impl Freeze for ResourceLocator
impl RefUnwindSafe for ResourceLocator
impl Send for ResourceLocator
impl Sync for ResourceLocator
impl Unpin for ResourceLocator
impl UnsafeUnpin for ResourceLocator
impl UnwindSafe for ResourceLocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more