[英]FileSystemRights ToString formatting
I'm enumerating files/folder with C# and wondering whether there's any libraries (or better .Net feature) available formatting the FileSystemAccessRule.FileSystemRights property into a POSIX like unix file permission string; 我正在用C#枚举文件/文件夹,想知道是否有任何库(或更好的.Net功能)可以将FileSystemAccessRule.FileSystemRights属性格式化为POSIX(如unix文件许可权字符串)格式;
d--x- d--x-
Thanks for any help. 谢谢你的帮助。
Why would you want an encoded string when you can print out the actual string descriptions? 当您可以打印出实际的字符串描述时,为什么还要编码字符串?
FileSystemRights Rights = 0;
Rights |= FileSystemRights.CreateFiles;
Rights |= FileSystemRights.ExecuteFile;
Console.WriteLine(Rights.ToString());
// Prints: CreateFiles, ExecuteFile
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.