Skip to content

Commit 66e842b

Browse files
Links and punctionaction fixes.
1 parent 7f36a18 commit 66e842b

File tree

1 file changed

+57
-43
lines changed

1 file changed

+57
-43
lines changed

src/libstd/fs.rs

+57-43
Original file line numberDiff line numberDiff line change
@@ -761,16 +761,17 @@ impl AsInner<fs_imp::DirEntry> for DirEntry {
761761
/// # Platform behavior
762762
///
763763
/// This function currently corresponds to the `unlink` function on Unix
764-
/// and the `DeleteFile` function on Windows. Note that, this
765-
/// [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
764+
/// and the `DeleteFile` function on Windows.
765+
/// Note that, this [may change in the future][changes].
766+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
766767
///
767768
/// # Errors
768769
///
769770
/// This function will return an error in the following situations, but is not
770771
/// limited to just these cases:
771772
///
772-
/// * `path` points to a directory
773-
/// * The user lacks permissions to remove the file
773+
/// * `path` points to a directory.
774+
/// * The user lacks permissions to remove the file.
774775
///
775776
/// # Examples
776777
///
@@ -796,16 +797,17 @@ pub fn remove_file<P: AsRef<Path>>(path: P) -> io::Result<()> {
796797
/// # Platform behavior
797798
///
798799
/// This function currently corresponds to the `stat` function on Unix
799-
/// and the `GetFileAttributesEx` function on Windows. Note that, this
800-
/// [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
800+
/// and the `GetFileAttributesEx` function on Windows.
801+
/// Note that, this [may change in the future][changes].
802+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
801803
///
802804
/// # Errors
803805
///
804806
/// This function will return an error in the following situations, but is not
805807
/// limited to just these cases:
806808
///
807-
/// * The user lacks permissions to perform `metadata` call on `path`
808-
/// * `path` does not exist
809+
/// * The user lacks permissions to perform `metadata` call on `path`.
810+
/// * `path` does not exist.
809811
///
810812
/// # Examples
811813
///
@@ -828,16 +830,17 @@ pub fn metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
828830
/// # Platform behavior
829831
///
830832
/// This function currently corresponds to the `lstat` function on Unix
831-
/// and the `GetFileAttributesEx` function on Windows. Note that, this
832-
/// [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
833+
/// and the `GetFileAttributesEx` function on Windows.
834+
/// Note that, this [may change in the future][changes].
835+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
833836
///
834837
/// # Errors
835838
///
836839
/// This function will return an error in the following situations, but is not
837840
/// limited to just these cases:
838841
///
839-
/// * The user lacks permissions to perform `metadata` call on `path`
840-
/// * `path` does not exist
842+
/// * The user lacks permissions to perform `metadata` call on `path`.
843+
/// * `path` does not exist.
841844
///
842845
/// # Examples
843846
///
@@ -863,16 +866,17 @@ pub fn symlink_metadata<P: AsRef<Path>>(path: P) -> io::Result<Metadata> {
863866
///
864867
/// This function currently corresponds to the `rename` function on Unix
865868
/// and the `MoveFileEx` function with the `MOVEFILE_REPLACE_EXISTING` flag on Windows.
866-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
869+
/// Note that, this [may change in the future][changes].
870+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
867871
///
868872
/// # Errors
869873
///
870874
/// This function will return an error in the following situations, but is not
871875
/// limited to just these cases:
872876
///
873-
/// * `from` does not exist
874-
/// * The user lacks permissions to view contents
875-
/// * `from` and `to` are on separate filesystems
877+
/// * `from` does not exist.
878+
/// * The user lacks permissions to view contents.
879+
/// * `from` and `to` are on separate filesystems.
876880
///
877881
/// # Examples
878882
///
@@ -905,17 +909,18 @@ pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<()>
905909
/// with `O_RDONLY` for `from` and `O_WRONLY`, `O_CREAT`, and `O_TRUNC` for `to`.
906910
/// `O_CLOEXEC` is set for returned file descriptors.
907911
/// On Windows, this function currently corresponds to `CopyFileEx`.
908-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
912+
/// Note that, this [may change in the future][changes].
913+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
909914
///
910915
/// # Errors
911916
///
912917
/// This function will return an error in the following situations, but is not
913918
/// limited to just these cases:
914919
///
915-
/// * The `from` path is not a file
916-
/// * The `from` file does not exist
920+
/// * The `from` path is not a file.
921+
/// * The `from` file does not exist.
917922
/// * The current process does not have the permission rights to access
918-
/// `from` or write `to`
923+
/// `from` or write `to`.
919924
///
920925
/// # Examples
921926
///
@@ -940,14 +945,15 @@ pub fn copy<P: AsRef<Path>, Q: AsRef<Path>>(from: P, to: Q) -> io::Result<u64> {
940945
///
941946
/// This function currently corresponds to the `link` function on Unix
942947
/// and the `CreateHardLink` function on Windows.
943-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
948+
/// Note that, this [may change in the future][changes].
949+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
944950
///
945951
/// # Errors
946952
///
947953
/// This function will return an error in the following situations, but is not
948954
/// limited to just these cases:
949955
///
950-
/// * The `src` path is not a file or doesn't exist
956+
/// * The `src` path is not a file or doesn't exist.
951957
///
952958
/// # Examples
953959
///
@@ -997,15 +1003,16 @@ pub fn soft_link<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q) -> io::Result<(
9971003
/// This function currently corresponds to the `readlink` function on Unix
9981004
/// and the `CreateFile` function with `FILE_FLAG_OPEN_REPARSE_POINT` and
9991005
/// `FILE_FLAG_BACKUP_SEMANTICS` flags on Windows.
1000-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1006+
/// Note that, this [may change in the future][changes].
1007+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
10011008
///
10021009
/// # Errors
10031010
///
10041011
/// This function will return an error in the following situations, but is not
10051012
/// limited to just these cases:
10061013
///
1007-
/// * `path` is not a symbolic link
1008-
/// * `path` does not exist
1014+
/// * `path` is not a symbolic link.
1015+
/// * `path` does not exist.
10091016
///
10101017
/// # Examples
10111018
///
@@ -1029,15 +1036,16 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
10291036
///
10301037
/// This function currently corresponds to the `realpath` function on Unix
10311038
/// and the `CreateFile` and `GetFinalPathNameByHandle` functions on Windows.
1032-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1039+
/// Note that, this [may change in the future][changes].
1040+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
10331041
///
10341042
/// # Errors
10351043
///
10361044
/// This function will return an error in the following situations, but is not
10371045
/// limited to just these cases:
10381046
///
1039-
/// * `path` does not exist
1040-
/// * A component in path is not a directory
1047+
/// * `path` does not exist.
1048+
/// * A component in path is not a directory.
10411049
///
10421050
/// # Examples
10431051
///
@@ -1060,15 +1068,16 @@ pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
10601068
///
10611069
/// This function currently corresponds to the `mkdir` function on Unix
10621070
/// and the `CreateDirectory` function on Windows.
1063-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1071+
/// Note that, this [may change in the future][changes].
1072+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
10641073
///
10651074
/// # Errors
10661075
///
10671076
/// This function will return an error in the following situations, but is not
10681077
/// limited to just these cases:
10691078
///
1070-
/// * User lacks permissions to create directory at `path`
1071-
/// * `path` already exists
1079+
/// * User lacks permissions to create directory at `path`.
1080+
/// * `path` already exists.
10721081
///
10731082
/// # Examples
10741083
///
@@ -1092,7 +1101,8 @@ pub fn create_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
10921101
///
10931102
/// This function currently corresponds to the `mkdir` function on Unix
10941103
/// and the `CreateDirectory` function on Windows.
1095-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1104+
/// Note that, this [may change in the future][changes].
1105+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
10961106
///
10971107
/// # Errors
10981108
///
@@ -1125,15 +1135,16 @@ pub fn create_dir_all<P: AsRef<Path>>(path: P) -> io::Result<()> {
11251135
///
11261136
/// This function currently corresponds to the `rmdir` function on Unix
11271137
/// and the `RemoveDirectory` function on Windows.
1128-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1138+
/// Note that, this [may change in the future][changes].
1139+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
11291140
///
11301141
/// # Errors
11311142
///
11321143
/// This function will return an error in the following situations, but is not
11331144
/// limited to just these cases:
11341145
///
1135-
/// * The user lacks permissions to remove the directory at the provided `path`
1136-
/// * The directory isn't empty
1146+
/// * The user lacks permissions to remove the directory at the provided `path`.
1147+
/// * The directory isn't empty.
11371148
///
11381149
/// # Examples
11391150
///
@@ -1161,7 +1172,8 @@ pub fn remove_dir<P: AsRef<Path>>(path: P) -> io::Result<()> {
11611172
/// This function currently corresponds to `opendir`, `lstat`, `rm` and `rmdir` functions on Unix
11621173
/// and the `FindFirstFile`, `GetFileAttributesEx`, `DeleteFile`, and `RemoveDirectory` functions
11631174
/// on Windows.
1164-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1175+
/// Note that, this [may change in the future][changes].
1176+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
11651177
///
11661178
/// # Errors
11671179
///
@@ -1204,16 +1216,17 @@ fn _remove_dir_all(path: &Path) -> io::Result<()> {
12041216
///
12051217
/// This function currently corresponds to the `opendir` function on Unix
12061218
/// and the `FindFirstFile` function on Windows.
1207-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1219+
/// Note that, this [may change in the future][changes].
1220+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
12081221
///
12091222
/// # Errors
12101223
///
12111224
/// This function will return an error in the following situations, but is not
12121225
/// limited to just these cases:
12131226
///
1214-
/// * The provided `path` doesn't exist
1215-
/// * The process lacks permissions to view the contents
1216-
/// * The `path` points at a non-directory file
1227+
/// * The provided `path` doesn't exist.
1228+
/// * The process lacks permissions to view the contents.
1229+
/// * The `path` points at a non-directory file.
12171230
///
12181231
/// # Examples
12191232
///
@@ -1306,15 +1319,16 @@ impl Iterator for WalkDir {
13061319
///
13071320
/// This function currently corresponds to the `chmod` function on Unix
13081321
/// and the `SetFileAttributes` function on Windows.
1309-
/// Note that, this [may change in the future.][https://github.com/rust-lang/rust/pull/28613]
1322+
/// Note that, this [may change in the future][changes].
1323+
/// [changes]: https://github.com/rust-lang/rust/pull/28613
13101324
///
13111325
/// # Errors
13121326
///
13131327
/// This function will return an error in the following situations, but is not
13141328
/// limited to just these cases:
13151329
///
1316-
/// * `path` does not exist
1317-
/// * The user lacks the permission to change attributes of the file
1330+
/// * `path` does not exist.
1331+
/// * The user lacks the permission to change attributes of the file.
13181332
///
13191333
/// # Examples
13201334
///

0 commit comments

Comments
 (0)