@@ -51,7 +51,6 @@ use vec::Vec;
51
51
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
52
52
pub struct File {
53
53
inner : fs_imp:: File ,
54
- path : Option < PathBuf > ,
55
54
}
56
55
57
56
/// Metadata information about a file.
@@ -193,12 +192,12 @@ impl File {
193
192
OpenOptions :: new ( ) . write ( true ) . create ( true ) . truncate ( true ) . open ( path)
194
193
}
195
194
196
- /// Returns the original path that was used to open this file .
195
+ /// Returns `None` .
197
196
#[ unstable( feature = "file_path" ,
198
- reason = "this abstraction is imposed by this library instead \
199
- of the underlying OS and may be removed") ]
197
+ reason = "this abstraction was imposed by this library and was removed" ) ]
198
+ # [ deprecated ( since = "1.0.0" , reason = "abstraction was removed") ]
200
199
pub fn path ( & self ) -> Option < & Path > {
201
- self . path . as_ref ( ) . map ( |p| & * * p )
200
+ None
202
201
}
203
202
204
203
/// Attempt to sync all OS-internal metadata to disk.
@@ -302,7 +301,7 @@ impl AsInner<fs_imp::File> for File {
302
301
}
303
302
impl FromInner < fs_imp:: File > for File {
304
303
fn from_inner ( f : fs_imp:: File ) -> File {
305
- File { inner : f, path : None }
304
+ File { inner : f }
306
305
}
307
306
}
308
307
@@ -470,7 +469,7 @@ impl OpenOptions {
470
469
pub fn open < P : AsRef < Path > > ( & self , path : P ) -> io:: Result < File > {
471
470
let path = path. as_ref ( ) ;
472
471
let inner = try!( fs_imp:: File :: open ( path, & self . 0 ) ) ;
473
- Ok ( File { path : Some ( path . to_path_buf ( ) ) , inner : inner } )
472
+ Ok ( File { inner : inner } )
474
473
}
475
474
}
476
475
0 commit comments