For me HasValidFileNameChars function (in Delphi XE7) returns false for UNC files:
B:= IOUtils.TPath.HasValidFileNameChars('\\ETA-PC\tests\test.ini', FALSE)
B is false now
This means that if you try to validate the filename that I show in my test (yes the file is real and as you can see its name is correct) HasValidFileNameChars will fail. HasValidPathChars work!
Is this normal?
- Edit:
In the Help page, the first parameter is named 'path'. Which made me believe that the function will accept full paths.
Quote:
Name Meaning
Path The verified file name string.
Use HasValidPathChars instead of HasValidFileNameChars. A file name cannot contain the backslash.