What characters are forbidden in Windows and Linux directory names?

前端 未结 17 2850
北海茫月
北海茫月 2020-11-22 01:05

I know that / is illegal in Linux, and the following are illegal in Windows (I think) * . \" / \\ [

17条回答
  •  天涯浪人
    2020-11-22 02:06

    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.

提交回复
热议问题