The .NET Framework System.IO
provides the following functions for invalid file system characters:
- Path.GetInvalidFileNameChars
- Path.GetInvalidPathChars
Those functions should return appropriate results depending on the platform the .NET runtime is running in.