Reputation: 1
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.
Upvotes: -1
Views: 390
Reputation: 21657
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();
Upvotes: 0