Updated the code example in the os module to use better grammar. (#12328)

This commit is contained in:
Andrew Smith 2019-10-01 23:43:38 -05:00 • committed by Varriount
commit 0d94ee15c0

View file

@ -15,19 +15,20 @@
## import os ## import os
## ##
## let myFile = "/path/to/my/file.nim" ## let myFile = "/path/to/my/file.nim"
## ##
## let splittedPath = splitPath(myFile) ## let pathSplit = splitPath(myFile)
## assert splittedPath.head == "/path/to/my" ## assert pathSplit.head == "/path/to/my"
## assert splittedPath.tail == "file.nim" ## assert pathSplit.tail == "file.nim"
## ##
## assert parentDir(myFile) == "/path/to/my" ## assert parentDir(myFile) == "/path/to/my"
## ##
## let splittedFile = splitFile(myFile) ## let fileSplit = splitFile(myFile)
## assert splittedFile.dir == "/path/to/my" ## assert fileSplit.dir == "/path/to/my"
## assert splittedFile.name == "file" ## assert fileSplit.name == "file"
## assert splittedFile.ext == ".nim" ## assert fileSplit.ext == ".nim"
## ##
## assert myFile.changeFileExt("c") == "/path/to/my/file.c" ## assert myFile.changeFileExt("c") == "/path/to/my/file.c"
## ##
## ##
## **See also:** ## **See also:**