Hi!
What is equivalent function ?
As subject.
TIA,
Itamar M. Lins Jr.
xHarbour Language Reference Guide (Version 1.1) - FileStats()FileStats()
Retrieves file information for a single file.
Syntax
FileStats( <cFileName> , ;
[@<cFileAttr>] , ;
[@<nFileSize>] , ;
[@<dCreateDate>], ;
[@<nCreateTime>], ;
[@<dChangeDate>], ;
[@<nChangeTime>] ) --> lSuccess
Arguments *<cFileName>* This is a character string holding the name of the
file to query. It must include path and file extension. If the path is
omitted from *<cFileName>*, the file is searched in the current directory. @
*<cFileAttr>* If specified, *<cFileAttr>* must be passed by reference. It
receives the file attributes of the file as a character string. @*
<nFileSize>* If specified, *<cFileSize>* must be passed by reference. It
receives the file size of the file as a numeric value. @*<dCreateDate>* If
specified, *<dCreateDate>* must be passed by reference. It receives the
creation date of the file as a date value. @*<nCreateTime>* If specified, *
<nCreateTime>* must be passed by reference. It receives the creation time of
the file as a numeric value. The unit is "seconds elapsed since midnight".
Use function TString() <Tstring_f.en.html> to convert this value to a
"hh:mm:ss" formatted time string. @*<dChangeDate>* If specified, *
<dChangeDate>* must be passed by reference. It receives the last change date
of the file as a date value. @*<nChangeTime>* If specified,
*<nChangeTime>*must be passed by reference. It receives the creation
time of the file as a
numeric value. The unit is "seconds elapsed since midnight". Return
The return value is .T. (true) when the information on the file *<cFileName>
* could be retrieved, otherwise .F. (false) is returned.
Description
Function FileStats() retrieves statistical information about a single file.
It is more efficient than the Directory() <Directory_f.en.html> function
which retrieves the same information for a group of files and stores them in
an array. FileStats(), in contrast, allows for "picking" desired information
about a single file by passing the according parameters by reference to the
function.
Info
See also: Directory() <Directory_f.en.html>, FCreate() <Fcreate_f.en.html>,
HB_FSize() <Hb_fsize_f.en.html> Category: File
functions<../../Grp_file_functions.en.html>, Low
level file functions <../../Grp_low_level_file_functions.en.html> , xHarbour
extensions <../../Grp_xharbour_extensions.en.html> Source: rtl\filestat.c
LIB: xhb.lib DLL: xhbdll.dll
Example
// The example shows how to retrieve statistical information about
// a single file, and how to convert the time values from Seconds
// to a hh:mm:ss time formatted string.
PROCEDURE Main
LOCAL cFileName := "FILESTATS.PRG"
LOCAL cFileAttr , nFileSize
LOCAL dCreateDate, nCreateTime
LOCAL dChangeDate, nChangeTime
? FileStats( cFileName, @cFileAttr , @nFileSize , ;
@dCreateDate, @nCreateTime, ;
@dChangeDate, @nChangeTime )
? "File statistiscs"
? "File Name :", cFileName
? "Attributes:", cFileAttr
? "File Size :", nFileSize
? "Created :", dCreateDate, TString( nCreateTime )
? "Changed :", dChangeDate, TSTring( nChangeTime )
RETURN
_______________________________________________
Harbour-users mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour-users