@@ -273,7 +273,7 @@ impl File {
273
273
///
274
274
/// # Error
275
275
///
276
- /// This function will return an error if the path points to a directory, the
276
+ /// This function will return an error if ` path` points to a directory, if the
277
277
/// user lacks permissions to remove the file, or if some other filesystem-level
278
278
/// error occurs.
279
279
pub fn unlink ( path : & Path ) -> IoResult < ( ) > {
@@ -332,8 +332,8 @@ pub fn unlink(path: &Path) -> IoResult<()> {
332
332
///
333
333
/// # Error
334
334
///
335
- /// This call will return an error if the user lacks the requisite permissions
336
- /// to perform a `stat` call on the given path or if there is no entry in the
335
+ /// This function will return an error if the user lacks the requisite permissions
336
+ /// to perform a `stat` call on the given ` path` or if there is no entry in the
337
337
/// filesystem at the provided path.
338
338
pub fn stat ( path : & Path ) -> IoResult < FileStat > {
339
339
let err = match LocalIo :: maybe_raise ( |io| io. fs_stat ( & path. to_c_str ( ) ) ) {
@@ -415,9 +415,9 @@ fn from_rtio(s: rtio::FileStat) -> FileStat {
415
415
///
416
416
/// # Error
417
417
///
418
- /// Will return an error if the provided `path ` doesn't exist, the process lacks
419
- /// permissions to view the contents, or if some other intermittent I/O error
420
- /// occurs.
418
+ /// This function will return an error if the provided `from ` doesn't exist, if
419
+ /// the process lacks permissions to view the contents, or if some other
420
+ /// intermittent I/O error occurs.
421
421
pub fn rename ( from : & Path , to : & Path ) -> IoResult < ( ) > {
422
422
let err = LocalIo :: maybe_raise ( |io| {
423
423
io. fs_rename ( & from. to_c_str ( ) , & to. to_c_str ( ) )
@@ -444,8 +444,8 @@ pub fn rename(from: &Path, to: &Path) -> IoResult<()> {
444
444
///
445
445
/// # Error
446
446
///
447
- /// Will return an error in the following situations, but is not limited to
448
- /// just these cases:
447
+ /// This function will return an error in the following situations, but is not
448
+ /// limited to just these cases:
449
449
///
450
450
/// * The `from` path is not a file
451
451
/// * The `from` file does not exist
@@ -503,9 +503,9 @@ pub fn copy(from: &Path, to: &Path) -> IoResult<()> {
503
503
///
504
504
/// # Error
505
505
///
506
- /// If this function encounters an I/O error, it will return an `Err` value.
507
- /// Some possible error situations are not having the permission to
508
- /// change the attributes of a file or the file not existing .
506
+ /// This function will return an error if the provided `path` doesn't exist, if
507
+ /// the process lacks permissions to change the attributes of the file, or if
508
+ /// some other I/O error is encountered .
509
509
pub fn chmod ( path : & Path , mode : io:: FilePermission ) -> IoResult < ( ) > {
510
510
let err = LocalIo :: maybe_raise ( |io| {
511
511
io. fs_chmod ( & path. to_c_str ( ) , mode. bits ( ) as uint )
@@ -577,8 +577,8 @@ pub fn readlink(path: &Path) -> IoResult<Path> {
577
577
///
578
578
/// # Error
579
579
///
580
- /// This call will return an error if the user lacks permissions to make a new
581
- /// directory at the provided path, or if the directory already exists.
580
+ /// This function will return an error if the user lacks permissions to make a
581
+ /// new directory at the provided ` path` , or if the directory already exists.
582
582
pub fn mkdir ( path : & Path , mode : FilePermission ) -> IoResult < ( ) > {
583
583
let err = LocalIo :: maybe_raise ( |io| {
584
584
io. fs_mkdir ( & path. to_c_str ( ) , mode. bits ( ) as uint )
@@ -602,8 +602,8 @@ pub fn mkdir(path: &Path, mode: FilePermission) -> IoResult<()> {
602
602
///
603
603
/// # Error
604
604
///
605
- /// This call will return an error if the user lacks permissions to remove the
606
- /// directory at the provided path, or if the directory isn't empty.
605
+ /// This function will return an error if the user lacks permissions to remove
606
+ /// the directory at the provided ` path` , or if the directory isn't empty.
607
607
pub fn rmdir ( path : & Path ) -> IoResult < ( ) > {
608
608
let err = LocalIo :: maybe_raise ( |io| {
609
609
io. fs_rmdir ( & path. to_c_str ( ) )
@@ -640,9 +640,9 @@ pub fn rmdir(path: &Path) -> IoResult<()> {
640
640
///
641
641
/// # Error
642
642
///
643
- /// Will return an error if the provided `from ` doesn't exist, the process lacks
644
- /// permissions to view the contents or if the `path` points at a non-directory
645
- /// file
643
+ /// This function will return an error if the provided `path ` doesn't exist, if
644
+ /// the process lacks permissions to view the contents or if the `path` points
645
+ /// at a non-directory file
646
646
pub fn readdir ( path : & Path ) -> IoResult < Vec < Path > > {
647
647
let err = LocalIo :: maybe_raise ( |io| {
648
648
Ok ( try!( io. fs_readdir ( & path. to_c_str ( ) , 0 ) ) . move_iter ( ) . map ( |a| {
@@ -697,8 +697,7 @@ impl Iterator<Path> for Directories {
697
697
///
698
698
/// # Error
699
699
///
700
- /// This function will return an `Err` value if an error happens, see
701
- /// `fs::mkdir` for more information about error conditions and performance.
700
+ /// See `fs::mkdir`.
702
701
pub fn mkdir_recursive ( path : & Path , mode : FilePermission ) -> IoResult < ( ) > {
703
702
// tjc: if directory exists but with different permissions,
704
703
// should we return false?
@@ -735,8 +734,7 @@ pub fn mkdir_recursive(path: &Path, mode: FilePermission) -> IoResult<()> {
735
734
///
736
735
/// # Error
737
736
///
738
- /// This function will return an `Err` value if an error happens. See
739
- /// `file::unlink` and `fs::readdir` for possible error conditions.
737
+ /// See `file::unlink` and `fs::readdir`
740
738
pub fn rmdir_recursive ( path : & Path ) -> IoResult < ( ) > {
741
739
let mut rm_stack = Vec :: new ( ) ;
742
740
rm_stack. push ( path. clone ( ) ) ;
0 commit comments