Retrieves the owner of a file.

GetFileOwner(cFileName, @rOwner[, @rDomain[, @rSidType]])

Parameters

cFileName

The name of the file for which to retrieve the owner.

Note

This can be a relative path or only a filename, the VFP function FULLPATH is used to retrieve the fully qualified filename.
The usual VFP search path (SET PATH) is used.

rOwner

A reference to a variable that receives the owner of the file.

rDomain

A reference to a variable that receives the domain of the owner of the file.

rSidType

A reference to a variable that receives the type of the account.
The type is one of the values in SID_NAME_USE enumeration.

Return Value

Always .T.

See Also

Reference

ADirectoryInfo
ADirEx
ADriveInfo
AFileAttributes
AFileAttributesEx
CancelFileChange
CompareFileTimes
CopyFileEx
DeleteDirectory
DeleteFileEx
FindFileChange
GetFileAttributes
GetFileSize
GetFileTimes
GetLongPathName
GetShortPathName
MoveFileEx
SetFileAttributes
SetFileTimes

Used WinApi functions

CreateFile
GetKernelObjectSecurity
GetSecurityDescriptorOwner
LookupAccountSid
CloseHandle