@@ -6,7 +6,7 @@ use serde_repr::{Deserialize_repr, Serialize_repr};
66/// The base directory is the optional root of a FS operation.
77/// If informed by the API call, all paths will be relative to the path of the given directory.
88///
9- /// For more information, check the [dirs documentation](https://docs.rs/dirs /).
9+ /// For more information, check the [dirs_next documentation](https://docs.rs/dirs_next /).
1010#[ derive( Serialize_repr , Deserialize_repr , Clone , Debug ) ]
1111#[ repr( u16 ) ]
1212pub enum BaseDirectory {
@@ -95,82 +95,82 @@ pub fn resolve_path<P: AsRef<Path>>(path: P, dir: Option<BaseDirectory>) -> crat
9595
9696/// Returns the path to the user's audio directory.
9797pub fn audio_dir ( ) -> Option < PathBuf > {
98- dirs :: audio_dir ( )
98+ dirs_next :: audio_dir ( )
9999}
100100
101101/// Returns the path to the user's cache directory.
102102pub fn cache_dir ( ) -> Option < PathBuf > {
103- dirs :: cache_dir ( )
103+ dirs_next :: cache_dir ( )
104104}
105105
106106/// Returns the path to the user's config directory.
107107pub fn config_dir ( ) -> Option < PathBuf > {
108- dirs :: config_dir ( )
108+ dirs_next :: config_dir ( )
109109}
110110
111111/// Returns the path to the user's data directory.
112112pub fn data_dir ( ) -> Option < PathBuf > {
113- dirs :: data_dir ( )
113+ dirs_next :: data_dir ( )
114114}
115115
116116/// Returns the path to the user's local data directory.
117117pub fn local_data_dir ( ) -> Option < PathBuf > {
118- dirs :: data_local_dir ( )
118+ dirs_next :: data_local_dir ( )
119119}
120120
121121/// Returns the path to the user's desktop directory.
122122pub fn desktop_dir ( ) -> Option < PathBuf > {
123- dirs :: desktop_dir ( )
123+ dirs_next :: desktop_dir ( )
124124}
125125
126126/// Returns the path to the user's document directory.
127127pub fn document_dir ( ) -> Option < PathBuf > {
128- dirs :: document_dir ( )
128+ dirs_next :: document_dir ( )
129129}
130130
131131/// Returns the path to the user's download directory.
132132pub fn download_dir ( ) -> Option < PathBuf > {
133- dirs :: download_dir ( )
133+ dirs_next :: download_dir ( )
134134}
135135
136136/// Returns the path to the user's executable directory.
137137pub fn executable_dir ( ) -> Option < PathBuf > {
138- dirs :: executable_dir ( )
138+ dirs_next :: executable_dir ( )
139139}
140140
141141/// Returns the path to the user's font directory.
142142pub fn font_dir ( ) -> Option < PathBuf > {
143- dirs :: font_dir ( )
143+ dirs_next :: font_dir ( )
144144}
145145
146146/// Returns the path to the user's home directory.
147147pub fn home_dir ( ) -> Option < PathBuf > {
148- dirs :: home_dir ( )
148+ dirs_next :: home_dir ( )
149149}
150150
151151/// Returns the path to the user's picture directory.
152152pub fn picture_dir ( ) -> Option < PathBuf > {
153- dirs :: picture_dir ( )
153+ dirs_next :: picture_dir ( )
154154}
155155
156156/// Returns the path to the user's public directory.
157157pub fn public_dir ( ) -> Option < PathBuf > {
158- dirs :: public_dir ( )
158+ dirs_next :: public_dir ( )
159159}
160160
161161/// Returns the path to the user's runtime directory.
162162pub fn runtime_dir ( ) -> Option < PathBuf > {
163- dirs :: runtime_dir ( )
163+ dirs_next :: runtime_dir ( )
164164}
165165
166166/// Returns the path to the user's template directory.
167167pub fn template_dir ( ) -> Option < PathBuf > {
168- dirs :: template_dir ( )
168+ dirs_next :: template_dir ( )
169169}
170170
171171/// Returns the path to the user's video dir
172172pub fn video_dir ( ) -> Option < PathBuf > {
173- dirs :: video_dir ( )
173+ dirs_next :: video_dir ( )
174174}
175175
176176/// Returns the path to the resource directory of this app.
@@ -190,7 +190,7 @@ fn app_name() -> crate::Result<String> {
190190
191191/// Returns the path to the suggested directory for your app config files.
192192pub fn app_dir ( ) -> Option < PathBuf > {
193- dirs :: config_dir ( ) . and_then ( |mut dir| {
193+ dirs_next :: config_dir ( ) . and_then ( |mut dir| {
194194 if let Ok ( app_name) = app_name ( ) {
195195 dir. push ( app_name) ;
196196 Some ( dir)
0 commit comments