mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-12 06:18:51 +00:00
cleanup os related documentation links (#20663)
cleanup documentation links
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user