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

(cherry picked from commit 0d94ee15c0)
This commit is contained in:
Andrew Smith
2019-10-01 23:43:38 -05:00
committed by narimiran
parent 0ea770c8f0
commit e03b1b79ae

View File

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