Question about cmd.NewFsFile()

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()

  1. If I call with with args "/dir1", src = "/dir1" filename="".
  2. If I call with with args "/dir1/file1.txt", src = "/dir1" filename="file1.txt".
  3. 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?

can run the commands with -vv --dry-run and then take a look at the debug output.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.