pub struct Paths {
pub config: PathBuf,
pub data: PathBuf,
pub internal: PathBuf,
pub assets: PathBuf,
pub libraries: PathBuf,
pub java: PathBuf,
pub jars: PathBuf,
pub auth: PathBuf,
pub logs: PathBuf,
pub launch_logs: PathBuf,
pub run: PathBuf,
pub stdio: PathBuf,
}Expand description
Store for all of the paths that are used throughout the application
Fields§
§config: PathBufConfig directory
data: PathBufHolds data
internal: PathBufHolds internal data
assets: PathBufHolds game assets
libraries: PathBufHolds game libraries
java: PathBufHolds Java installations
jars: PathBufHolds game jar files
auth: PathBufHolds authentication data
logs: PathBufHolds log files
launch_logs: PathBufHolds launch log files
run: PathBufUsed for runtime info like PIDs
stdio: PathBufUsed for temporary stdio files for instances
Implementations§
Source§impl Paths
impl Paths
Sourcepub fn new() -> Result<Paths>
pub fn new() -> Result<Paths>
Create a new Paths object. This will create all of the directories referenced in the paths if they do not already exist.
Sourcepub fn create_dirs(&self) -> Result<()>
pub fn create_dirs(&self) -> Result<()>
Create the directories on an existing set of paths
Sourcepub fn new_no_create() -> Result<Self>
pub fn new_no_create() -> Result<Self>
Create the paths without creating any directories
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Paths
impl RefUnwindSafe for Paths
impl Send for Paths
impl Sync for Paths
impl Unpin for Paths
impl UnwindSafe for Paths
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more