diff options
author | Araq <rumpf_a@web.de> | 2011-02-02 23:03:42 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-02-02 23:03:42 +0100 |
commit | 1eba1063bdccee5b3924d796824cdc1d567ec6ed (patch) | |
tree | 75bc5a575f752e0a84f877d27be94b7dffe89727 /lib | |
parent | 5e657a4b343da2727494bc3622a03e06c03fdf79 (diff) | |
download | Nim-1eba1063bdccee5b3924d796824cdc1d567ec6ed.tar.gz |
nimgrep --ext support
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/pure/os.nim | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 987662975..9fafed71b 100755 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -1165,7 +1165,7 @@ when defined(macosx): proc getExecPath2(c: cstring, size: var int32): bool {. importc: "_NSGetExecutablePath", header: "<mach-o/dyld.h>".} -proc getApplicationFilename*(): string {.rtl, extern: "nos$1".} = +proc getAppFilename*(): string {.rtl, extern: "nos$1".} = ## Returns the filename of the application's executable. # Linux: /proc/<pid>/exe @@ -1202,9 +1202,21 @@ proc getApplicationFilename*(): string {.rtl, extern: "nos$1".} = var x = joinPath(p, result) if ExistsFile(x): return x -proc getApplicationDir*(): string {.rtl, extern: "nos$1".} = +proc getApplicationFilename*(): string {.rtl, extern: "nos$1", deprecated.} = + ## Returns the filename of the application's executable. + ## **Deprecated since version 0.8.12**: use ``getAppFilename`` + ## instead. + result = getAppFilename() + +proc getApplicationDir*(): string {.rtl, extern: "nos$1", deprecated.} = + ## Returns the directory of the application's executable. + ## **Deprecated since version 0.8.12**: use ``getAppDir`` + ## instead. + result = splitFile(getAppFilename()).dir + +proc getAppDir*(): string {.rtl, extern: "nos$1".} = ## Returns the directory of the application's executable. - result = splitFile(getApplicationFilename()).dir + result = splitFile(getAppFilename()).dir proc sleep*(milsecs: int) {.rtl, extern: "nos$1".} = ## sleeps `milsecs` milliseconds. |