refactor envvars, oserrors; register vmops (#20592)
* refactor envvars, oserrors; register vmops * remove type definitions
This commit is contained in:
parent
b13ef07f58
commit
b07526b2c7
5 changed files with 17 additions and 347 deletions
|
|
@ -81,11 +81,6 @@ else:
|
|||
proc normalizePathAux(path: var string){.inline, raises: [], noSideEffect.}
|
||||
|
||||
type
|
||||
ReadEnvEffect* = object of ReadIOEffect ## Effect that denotes a read
|
||||
## from an environment variable.
|
||||
WriteEnvEffect* = object of WriteIOEffect ## Effect that denotes a write
|
||||
## to an environment variable.
|
||||
|
||||
ReadDirEffect* = object of ReadIOEffect ## Effect that denotes a read
|
||||
## operation from the directory
|
||||
## structure.
|
||||
|
|
@ -93,8 +88,6 @@ type
|
|||
## operation to
|
||||
## the directory structure.
|
||||
|
||||
OSErrorCode* = distinct int32 ## Specifies an OS Error Code.
|
||||
|
||||
import std/private/osseps
|
||||
export osseps
|
||||
|
||||
|
|
@ -884,8 +877,11 @@ proc unixToNativePath*(path: string, drive=""): string {.
|
|||
add result, path[i]
|
||||
inc(i)
|
||||
|
||||
include "includes/oserr"
|
||||
include "includes/osenv"
|
||||
import std/oserrors
|
||||
export oserrors
|
||||
|
||||
import std/envvars
|
||||
export envvars
|
||||
|
||||
proc getHomeDir*(): string {.rtl, extern: "nos$1",
|
||||
tags: [ReadEnvEffect, ReadIOEffect].} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue