summary refs log tree commit diff stats
path: root/lib/std
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2022-10-27 18:16:27 +0800
committerGitHub <noreply@github.com>2022-10-27 12:16:27 +0200
commitc341f204762f002e657b5914921fe1fa8125f468 (patch)
tree0783cc788aab66f193d5ab4837738f8ae0d65969 /lib/std
parent5a14b9ea1fdc8845fb36028385f22aeb20a1ddd7 (diff)
downloadNim-c341f204762f002e657b5914921fe1fa8125f468.tar.gz
cleanup os related documentation links (#20663)
cleanup documentation links
Diffstat (limited to 'lib/std')
-rw-r--r--lib/std/dirs.nim17
-rw-r--r--lib/std/files.nim8
-rw-r--r--lib/std/paths.nim14
3 files changed, 12 insertions, 27 deletions
diff --git a/lib/std/dirs.nim b/lib/std/dirs.nim
index 770ea9a01..7d72af1eb 100644
--- a/lib/std/dirs.nim
+++ b/lib/std/dirs.nim
@@ -23,8 +23,6 @@ proc createDir*(dir: Path) {.inline, tags: [WriteDirEffect, ReadDirEffect].} =
   ## See also:
   ## * `removeDir proc`_
   ## * `existsOrCreateDir proc`_
-  ## * `copyDir proc`_
-  ## * `copyDirWithPermissions proc`_
   ## * `moveDir proc`_
   createDir(dir.string)
 
@@ -37,8 +35,6 @@ proc existsOrCreateDir*(dir: Path): bool {.inline, tags: [WriteDirEffect, ReadDi
   ## See also:
   ## * `removeDir proc`_
   ## * `createDir proc`_
-  ## * `copyDir proc`_
-  ## * `copyDirWithPermissions proc`_
   ## * `moveDir proc`_
   result = existsOrCreateDir(dir.string)
 
@@ -51,11 +47,9 @@ proc removeDir*(dir: Path, checkDir = false
   ## existed in the first place, unless `checkDir` = true.
   ##
   ## See also:
-  ## * `removeFile proc`_
+  ## * `removeFile proc <files.html#removeFile>`_
   ## * `existsOrCreateDir proc`_
   ## * `createDir proc`_
-  ## * `copyDir proc`_
-  ## * `copyDirWithPermissions proc`_
   ## * `moveDir proc`_
   removeDir(dir.string, checkDir)
 
@@ -68,9 +62,7 @@ proc moveDir*(source, dest: Path) {.inline, tags: [ReadIOEffect, WriteIOEffect].
   ## If this fails, `OSError` is raised.
   ##
   ## See also:
-  ## * `moveFile proc`_
-  ## * `copyDir proc`_
-  ## * `copyDirWithPermissions proc`_
+  ## * `moveFile proc <files.html#moveFile>`_
   ## * `removeDir proc`_
   ## * `existsOrCreateDir proc`_
   ## * `createDir proc`_
@@ -127,9 +119,6 @@ iterator walkDirRec*(dir: Path,
   ##
   ##
   ## See also:
-  ## * `walkPattern iterator`_
-  ## * `walkFiles iterator`_
-  ## * `walkDirs iterator`_
   ## * `walkDir iterator`_
   for p in walkDirRec(dir.string, yieldFilter, followFilter, relative,
                       checkDir, onlyRegular):
@@ -140,5 +129,5 @@ proc setCurrentDir*(newDir: Path) {.inline, tags: [].} =
   ## is raised if `newDir` cannot been set.
   ##
   ## See also:
-  ## * `getCurrentDir proc`_
+  ## * `getCurrentDir proc <paths.html#getCurrentDir>`_
   osdirs.setCurrentDir(newDir.string)
diff --git a/lib/std/files.nim b/lib/std/files.nim
index f7fbd5acd..5bc7f7965 100644
--- a/lib/std/files.nim
+++ b/lib/std/files.nim
@@ -19,9 +19,7 @@ proc removeFile*(file: Path) {.inline, tags: [WriteDirEffect].} =
   ## On Windows, ignores the read-only attribute.
   ##
   ## See also:
-  ## * `removeDir proc`_
-  ## * `copyFile proc`_
-  ## * `copyFileWithPermissions proc`_
+  ## * `removeDir proc <dirs.html#removeDir>`_
   ## * `moveFile proc`_
   removeFile(file.string)
 
@@ -38,8 +36,6 @@ proc moveFile*(source, dest: Path) {.inline,
   ## Can be used to `rename files`:idx:.
   ##
   ## See also:
-  ## * `moveDir proc`_
-  ## * `copyFile proc`_
-  ## * `copyFileWithPermissions proc`_
+  ## * `moveDir proc <dirs.html#moveDir>`_
   ## * `removeFile proc`_
   moveFile(source.string, dest.string)
diff --git a/lib/std/paths.nim b/lib/std/paths.nim
index 37466587b..59f7653c8 100644
--- a/lib/std/paths.nim
+++ b/lib/std/paths.nim
@@ -67,7 +67,7 @@ func splitPath*(path: Path): tuple[head, tail: Path] {.inline.} =
 func splitFile*(path: Path): tuple[dir, name: Path, ext: string] {.inline.} =
   ## Splits a filename into `(dir, name, extension)` tuple.
   ##
-  ## `dir` does not end in DirSep_ unless it's `/`.
+  ## `dir` does not end in DirSep unless it's `/`.
   ## `extension` includes the leading dot.
   ##
   ## If `path` has no extension, `ext` is the empty string.
@@ -91,7 +91,7 @@ func isAbsolute*(path: Path): bool {.inline, raises: [].} =
 proc relativePath*(path, base: Path, sep = DirSep): Path {.inline.} =
   ## Converts `path` to a path relative to `base`.
   ##
-  ## The `sep` (default: DirSep_) is used for the path normalizations,
+  ## The `sep` (default: DirSep) is used for the path normalizations,
   ## this can be useful to ensure the relative path only contains `'/'`
   ## so that it can be used for URL constructions.
   ##
@@ -237,10 +237,10 @@ proc getCurrentDir*(): Path {.inline, tags: [].} =
   ## So the path returned by this proc is determined at run time.
   ##
   ## See also:
-  ## * `getHomeDir proc`_
-  ## * `getConfigDir proc`_
-  ## * `getTempDir proc`_
-  ## * `setCurrentDir proc`_
+  ## * `getHomeDir proc <appdirs.html#getHomeDir>`_
+  ## * `getConfigDir proc <appdirs.html#getConfigDir>`_
+  ## * `getTempDir proc <appdirs.html#getTempDir>`_
+  ## * `setCurrentDir proc <dirs.html#setCurrentDir>`_
   ## * `currentSourcePath template <system.html#currentSourcePath.t>`_
   ## * `getProjectPath proc <macros.html#getProjectPath>`_
   result = Path(ospaths2.getCurrentDir())
@@ -275,7 +275,7 @@ proc expandTildeImpl(path: string): string {.
 proc expandTilde*(path: Path): Path {.inline,
   tags: [ReadEnvEffect, ReadIOEffect].} =
   ## Expands ``~`` or a path starting with ``~/`` to a full path, replacing
-  ## ``~`` with `getHomeDir()`_ (otherwise returns ``path`` unmodified).
+  ## ``~`` with `getHomeDir() <appdirs.html#getHomeDir>`_ (otherwise returns ``path`` unmodified).
   ##
   ## Windows: this is still supported despite the Windows platform not having this
   ## convention; also, both ``~/`` and ``~\`` are handled.