import ospaths
Results in :
lib/pure/ospaths.nim(173, 19) Error: invalid pragma: rtl
on latest dev
nim -v
Nim Compiler Version 0.13.1 (2016-05-31) [Linux: amd64]
Copyright (c) 2006-2016 by Andreas Rumpf
git hash: 893be3a5a40cbbceb211efe47361632ccdbed227
active boot switches: -d:release
Hope I am not the only one with this issue.
Try:
import os
echo joinPath("/usr", "local")
Thank you .
This works :
import os
echo getHomeDir()
This fails for some reason:
import ospaths
echo getHomeDir()
According to docs both should work.
Ospaths only works for nimscript :
The VM cannot deal with importc, the FFI is not available, so there are not many stdlib modules that you can use with Nim's VM. However, the following modules are available:
- strutils
- ospaths
- math
This explains it. Thank You.
Assuming you want to find getHomeDir in
http://nim-lang.org/docs/theindex.html
and then go to
http://nim-lang.org/docs/ospaths.html#getHomeDir,
you never see any reference to nimscript .