of_getlastaccessdate


pfcapsrv.pbl   >   pfc_n_cst_filesrvunicode   >   of_getlastaccessdate   

Full name pfc_n_cst_filesrvunicode.of_getlastaccessdate
Access public
Extend of integer
Return value integer
Prototype public function integer of_getlastaccessdate(string,ref date)

Name Datatype
No Data

Name Datatype
lstr_FindData os_finddata
lt_Time Time
lul_Handle ULong

public function integer of_getlastaccessdate (string as_filename, ref date ad_date);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_GetLastAccessDate
//	Arguments:		as_FileName				The name of the file for which you want its date;
//													an absolute path may be specified or it will be
//													relative to the current working directory
//						ad_Date					The date the file was last accessed, passed by reference.
//	Returns:			Integer
//						1 if successful, -1 if an error occurrs.
//	Description:	Get the date a file was last accessed (opened).  Note:  This function
//						only returns the Date because Last Access Time is not stored by
//						the operating system.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History:	Version
//						5.0   Initial version
//						5.0.03	Changed long variables to Ulong for NT4.0 compatibility
//////////////////////////////////////////////////////////////////////////////
//	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_Handle
Time					lt_Time
os_finddata			lstr_FindData

// Get the file information
lul_Handle = FindFirstFileW(as_FileName, lstr_FindData)
If lul_Handle <= 0 Then Return -1
FindClose(lul_Handle)

// Convert the date and time
Return of_ConvertFileDatetimeToPB(lstr_FindData.str_LastAccessTime, ad_Date, lt_Time)
end function

     
Name Owner
No Data

     
Name Owner
pfc_n_cst_filesrvunicode.FindFirstFileW pfc_n_cst_filesrvunicode
pfc_n_cst_filesrvunicode.FindClose pfc_n_cst_filesrvunicode
pfc_n_cst_filesrvunicode.of_convertfiledatetimetopb pfc_n_cst_filesrvunicode

     
Full name
pfc_n_cst_filesrvunicode.os_finddata

     
Name Scope
No Data