diff --git a/src/app_strategy.rs b/src/app_strategy.rs index 6e00a6c..6ba80d6 100644 --- a/src/app_strategy.rs +++ b/src/app_strategy.rs @@ -90,11 +90,19 @@ pub trait AppStrategy: Sized { fn cache_dir(&self) -> PathBuf; /// Gets the state directory for your application. - /// State directory may not to exist for all conventions. + /// Currently, only the [`Xdg`](struct.Xdg.html) & [`Unix`](struct.Unix.html) strategies support + /// this. fn state_dir(&self) -> Option; /// Gets the runtime directory for your application. - /// Runtime directory may not to exist for all conventions. + /// Currently, only the [`Xdg`](struct.Xdg.html) & [`Unix`](struct.Unix.html) strategies support + /// this. + /// + /// Note: The [XDG Base Directory Specification](spec) places additional requirements on this + /// directory related to ownership, permissions, and persistence. This library does not check + /// these requirements. + /// + /// [spec]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html fn runtime_dir(&self) -> Option; /// Constructs a path inside your application’s configuration directory to which a path of your choice has been appended. @@ -113,11 +121,17 @@ pub trait AppStrategy: Sized { } /// Constructs a path inside your application’s state directory to which a path of your choice has been appended. + /// + /// Currently, this is only implemented for the [`Xdg`](struct.Xdg.html) strategy. fn in_state_dir>(&self, path: P) -> Option { in_dir_method!(opt: self, path, state_dir) } /// Constructs a path inside your application’s runtime directory to which a path of your choice has been appended. + /// Currently, only the [`Xdg`](struct.Xdg.html) & [`Unix`](struct.Unix.html) strategies support + /// this. + /// + /// See the note in [`runtime_dir`](#method.runtime_dir) for more information. fn in_runtime_dir>(&self, path: P) -> Option { in_dir_method!(opt: self, path, runtime_dir) } diff --git a/src/base_strategy.rs b/src/base_strategy.rs index 4a5f160..5f8259b 100644 --- a/src/base_strategy.rs +++ b/src/base_strategy.rs @@ -23,11 +23,17 @@ pub trait BaseStrategy: Sized { fn cache_dir(&self) -> PathBuf; /// Gets the user’s state directory. - /// State directory may not exist for all conventions. + /// Currently, only the [`Xdg`](struct.Xdg.html) strategy supports this. fn state_dir(&self) -> Option; /// Gets the user’s runtime directory. - /// Runtime directory may not exist for all conventions. + /// Currently, only the [`Xdg`](struct.Xdg.html) strategy supports this. + /// + /// Note: The [XDG Base Directory Specification](spec) places additional requirements on this + /// directory related to ownership, permissions, and persistence. This library does not check + /// these requirements. + /// + /// [spec]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html fn runtime_dir(&self) -> Option; }