hi,
i noticed that if you want to check for the existance of a file or directory
it is needed to include a pattern in glob, otherwise you don't get the correct return value.
eg.
glob --exists -d my_directory
does NOT work, it returns 0 in any case
glob --exists -d my_dir*ctory
works, but is unsafe in some situations
if you have hardcoded paths (no variables) then this is a safe workaround
glob --exists -d my_dir[e]ctory
but is there a way to check for an absolute path?
(without using wildcards)
hi, i noticed that if you want to check for the existance of a file or directory it is needed to include a pattern in glob, otherwise you don't get the correct return value.
eg.
glob --exists -d my_directory
does NOT work, it returns 0 in any caseglob --exists -d my_dir*ctory
works, but is unsafe in some situationsif you have hardcoded paths (no variables) then this is a safe workaround
glob --exists -d my_dir[e]ctory
but is there a way to check for an absolute path? (without using wildcards)