I have questions about some functions and I wonder if anyone here can answer them.
Lets say I have a directory "/dir1" with a single file "file1.txt".
My question relates to src,fileName:=cmd.NewFsFile()
- If I call with with args "/dir1", src = "/dir1" filename="".
- If I call with with args "/dir1/file1.txt", src = "/dir1" filename="file1.txt".
- If I call with with args "/dir1/file2.txt", src = "/dir1/file2.txt" filename="".
How can I check for #1 or #3 know if it retured an existing directory ot a non existing path?