of_getfilesize


pfcapsrv.pbl   >   pfc_n_cst_filesrvunicode   >   of_getfilesize   

Full name pfc_n_cst_filesrvunicode.of_getfilesize
Access public
Extend of double
Return value double
Prototype public function double of_getfilesize(string)

Name Datatype
No Data

Name Datatype
ldb_Size Double
lstr_FindData os_finddata
lul_Handle ULong

public function double of_getfilesize (string as_filename);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_GetFileSize
//	Arguments:		as_FileName				The name of the file whose size is desired; an
//													absolute path may be specified or it will
//													be relative to the current working directory
//	Returns:			Double
//						The size of the file if successful, -1 if an error occurrs.
//	Description:	Get the size (in bytes) of a file.
//////////////////////////////////////////////////////////////////////////////
//	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.
//////////////////////////////////////////////////////////////////////////////
Double					ldb_Size
ULong						lul_Handle
os_finddata	lstr_FindData

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

// Calculate file size
ldb_Size = (lstr_FindData.ul_FileSizeHigh * (2.0 ^ 32))  + lstr_FindData.ul_FileSizeLow

Return ldb_Size
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

     
Full name
pfc_n_cst_filesrvunicode.os_finddata

     
Name Scope
No Data