开发者

Can GUID string be used as a folder name on a windows server

I would like to create folders dynamically on a windows web server to store uploaded files from client machines. I am planning to use GUID values, created as part of the asp.net membership module, as the folder names. Since the chracters, / \ * ? < > |, are not allowed in a windows folder name, 开发者_JAVA技巧I am wondering whether any of them will be part of a GUID and hence will cause issues.

Thanks


The string serialization used for GUIDs by .NET (as pointed out by the documentation, which you might want to read next time before asking) consists only of hexadecimal numbers and dashes, so yes, you can safely use them as file or directory names.


A GUID can simply be stored as the hexadecimal digits, so no problem. Or you can also intersperse the segments with hyphens, still with no problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜