简体   繁体   中英

Unable to retrieve the Author's information of a file using System.Io in C#

Unable to retrieve Author's information of a file using System.Io in C#.
I tried with GetOwner() method and ii is always gives a static value.
Kindly help me to get the Author's information under the File Properties which are under Details Tab.

If you want to get the user who created a file, you can try this:

string userWhoCreatedTheFile = System.IO.File.GetAccessControl(@"your path").GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM