Skip to content

Commit

Permalink
stdlib: remove deprecated os.existsFile/Dir
Browse files Browse the repository at this point in the history
fileExists/dirExists are already present
  • Loading branch information
saem committed Aug 6, 2022
1 parent aa11679 commit f69624f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
9 changes: 0 additions & 9 deletions lib/pure/os.nim
Original file line number Diff line number Diff line change
Expand Up @@ -3522,12 +3522,3 @@ func isValidFilename*(filename: string, maxLen = 259.Positive): bool {.since: (1
find(f.name, invalidFilenameChars) != -1): return false
for invalid in invalidFilenames:
if cmpIgnoreCase(f.name, invalid) == 0: return false

# deprecated declarations
when not defined(nimscript):
when not defined(js): # `noNimJs` doesn't work with templates, this should improve.
template existsFile*(args: varargs[untyped]): untyped {.deprecated: "use fileExists".} =
fileExists(args)
template existsDir*(args: varargs[untyped]): untyped {.deprecated: "use dirExists".} =
dirExists(args)
# {.deprecated: [existsFile: fileExists].} # pending bug #14819; this would avoid above mentioned issue
8 changes: 0 additions & 8 deletions lib/system/nimscript.nim
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,6 @@ proc dirExists*(dir: string): bool {.
## Checks if the directory `dir` exists.
builtin

template existsFile*(args: varargs[untyped]): untyped {.deprecated: "use fileExists".} =
# xxx: warning won't be shown for nimsscript because of current logic handling
# `foreignPackageNotes`
fileExists(args)

template existsDir*(args: varargs[untyped]): untyped {.deprecated: "use dirExists".} =
dirExists(args)

proc selfExe*(): string =
## Returns the currently running nim or nimble executable.
# TODO: consider making this as deprecated alias of `getCurrentCompilerExe`
Expand Down

0 comments on commit f69624f

Please sign in to comment.