summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-07-02 07:19:13 -0700
committerGitHub <noreply@github.com>2020-07-02 16:19:13 +0200
commitdc5a40f3f39c6ea672e6dc6aca7f8118a69dda99 (patch)
tree5565f50d66e33272624093268d0c8641c770f59e /compiler
parent366b9a7e4a067cece3b1215de7fb4dffc703e88a (diff)
downloadNim-dc5a40f3f39c6ea672e6dc6aca7f8118a69dda99.tar.gz
{.deprecated: [existsFile: fileExists].} (#14735)
* {.deprecated: [existsFile: fileExists].}

* s/existsFile/fileExists/ except under deps

* workaround pending #14819

* fix test
Diffstat (limited to 'compiler')
-rw-r--r--compiler/docgen.nim2
-rw-r--r--compiler/options.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/docgen.nim b/compiler/docgen.nim
index a973bdfc1..f501dcc8d 100644
--- a/compiler/docgen.nim
+++ b/compiler/docgen.nim
@@ -140,7 +140,7 @@ template declareClosures =
     result = options.findFile(conf, s).string
     if result.len == 0:
       result = getCurrentDir() / s
-      if not existsFile(result): result = ""
+      if not fileExists(result): result = ""
 
 proc parseRst(text, filename: string,
               line, column: int, hasToc: var bool,
diff --git a/compiler/options.nim b/compiler/options.nim
index abec038ed..247f35419 100644
--- a/compiler/options.nim
+++ b/compiler/options.nim
@@ -739,7 +739,7 @@ proc getRelativePathFromConfigPath*(conf: ConfigRef; f: AbsoluteFile): RelativeF
 
 proc findFile*(conf: ConfigRef; f: string; suppressStdlib = false): AbsoluteFile =
   if f.isAbsolute:
-    result = if f.existsFile: AbsoluteFile(f) else: AbsoluteFile""
+    result = if f.fileExists: AbsoluteFile(f) else: AbsoluteFile""
   else:
     result = rawFindFile(conf, RelativeFile f, suppressStdlib)
     if result.isEmpty: