From e03b1b79aee4cb28cded3ccdd62459a4e4669676 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 1 Oct 2019 23:43:38 -0500 Subject: [PATCH] Updated the code example in the os module to use better grammar. (#12328) (cherry picked from commit 0d94ee15c0ab07057dc9a0915d182917f3653c66) --- lib/pure/os.nim | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/lib/pure/os.nim b/lib/pure/os.nim index 45d28c6eea..03173708b6 100644 --- a/lib/pure/os.nim +++ b/lib/pure/os.nim @@ -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:**