of_setfileattributes


pfcapsrv.pbl   >   pfc_n_cst_filesrvhpux   >   of_setfileattributes   

Full name pfc_n_cst_filesrvhpux.of_setfileattributes
Access public
Extend of integer
Return value integer
Prototype public function integer of_setfileattributes(string,boolean,boolean,boolean,boolean)

Name Datatype
No Data

Name Datatype
lul_Attrib ulong

public function integer of_setfileattributes (string as_filename, boolean ab_readonly, boolean ab_hidden, boolean ab_system, boolean ab_archive);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_SetFileAttributes
//	Arguments:		as_FileName		The file whose attributes you want to set; an
//											absolute path may be specified or it will
//											be relative to the current working directory.
//						ab_ReadOnly		The new value for the Read-Only attribute.
//						ab_Hidden		The new value for the Hidden attribute.
//						ab_System		The new value for the System attribute.
//						ab_Archive		The new value for the Archive attribute.
//	Returns:			Integer
//						1 if successful,
//						-1 if an error occurrs.
//	Description:	Set the attributes of a file.  If null is passed for any of the attributes,	it will not be changed.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History:	Version
//						6.0   Initial version
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 Sybase, Inc. and its subsidiaries.  All rights reserved.  Any distribution of the 
// PowerBuilder Foundation Classes (PFC) source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//////////////////////////////////////////////////////////////////////////////
ulong		lul_Attrib

// Calculate the new attribute byte for the file
lul_Attrib = of_CalculateFileAttributes(as_FileName, ab_ReadOnly, ab_Hidden, ab_System, ab_Archive)
If lul_Attrib = -1 Then Return -1

If SetFileAttributesA(as_FileName, lul_Attrib) Then
	Return 1
Else
	Return 0
End If
end function

     
Name Owner
No Data

     
Name Owner
pfc_n_cst_filesrvhpux.SetFileAttributesA pfc_n_cst_filesrvhpux
pfc_n_cst_filesrv.of_calculatefileattributes pfc_n_cst_filesrv

     
Full name
No Data

     
Name Scope
No Data