in reply to Is there a way for checking if a Path is correct
c:\winmoff\folderforvirus32 => is correct path (on Win Sys, but not under Unixes)
c:\winmoff\\folderforvirus32 => is incorrect (everyware, I think)
Testing whether a path is valid under Unix is easy: as long as it doesn't contain "\x00" (NUL character in C) it's a valid path. Any other character is valid, and only / is special: it separates the path components. Hence, in a component (file- or directoryname), all characters, except the NUL character and the slash are allowed.$ mkdir /tmp/test $ cd /tmp/test $ mkdir 'c:\winmoff\folderforvirus32' $ mkdir 'c:\winmoff\\folderforvirus32' $ ls -1 c:\winmoff\\folderforvirus32 c:\winmoff\folderforvirus32 $ uname Linux $
|
|---|