This function checks the specified file name and ensures it is of a valid structure and syntax.
IsValidFileName([FileName])
Where:
FileName is the file name to check
Rule | Meaning |
|---|---|
| IsValidFileName("helloworld.txt") | This function validates the file name "helloworld.txt" and returns True as it is structurally and syntactically valid. |
| FileName | Outcome |
|---|---|
| "helloworld.txt" | True |
| "hello:world.txt" | False |
| "helloworld" | True |
| "\hello\world.txt" | False |
| "" | False |