.net - How to safely save file to disk without the risk of windows reject it? -


i'm developing winform application. want take input user (i.e. user provides username) , use input part of filename , save file.

how check if username provided user didn't contain windows' reserved characters. , list of reserved characters windows?

via:

    path.getinvalidfilenamechars() 

and

    path.getinvalidpathchars() 

the exact list could platform-specific (especially mono), , includes non-printable characters... showing them here tricky ;p


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -