16

Possible Duplicate:
Getting / setting file owner in C#

I searched the Internet but didn't found out how to get the File Creator/Owner In the FileInfo Class are only other Attributes like lastAccessTime, Size, but not the Owner/Creator.

Does somebody know the answer?

Community
  • 1
  • 1
Alex
  • 207
  • 1
  • 2
  • 11

1 Answers1

54
 string user = System.IO.File.GetAccessControl(path).GetOwner(typeof(System.Security.Principal.NTAccount)).ToString();
Olivier
  • 5,378
  • 2
  • 29
  • 42