FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Folder Permissions
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Folder Permissions
Posted: Thu Nov 13, 2014 06:14 PM

Is there a way to check to see if a user has "Full Control" permissions on a folder?

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: Folder Permissions
Posted: Sat Nov 15, 2014 03:58 PM
whithout testing:


Code (fw): Select all Collapse
FUNCTION lFolderPermissions(cFolder)
LOCAL lPermissions
LOCAL cRandomFile:= "xyz"+ LTrim(StrZero(Seconds(), 10, 2))
LOCAL cFileTest:= cFolder+ "\"+ cRandomFile

FClose(FCreate(cFileTest))

lPermissions:= File(cFileTest)
IF lPermissions
   DELETE FILE (cFileTest)
ENDIF
RETURN lPermissions

Continue the discussion