On 12/15/2011 07:52 AM, Felipe Monteiro de Carvalho wrote:
> In lazarus/components/lazutils/fileutil.pas there is:
>
> function FileSize(const Filename: string): int64;
>
> And as a bonus it works only with UTF-8
>
MSEgui has lib/common/kernel/msefileutils.pas:
"
type
ext1fileinfoty = record
filetype: filetypety;
attributes: fileattributesty;
size: int64;
modtime: tdatetime;
accesstime: tdatetime;
ctime: tdatetime;
end;
ext2fileinfoty = record
id: int64;
owner: longword;
group: longword;
end;
fileinfoty = record
name: filenamety;
state: fileinfostatesty;
extinfo1: ext1fileinfoty;
extinfo2: ext2fileinfoty;
end;
function getfileinfo(const path: filenamety; var info: fileinfoty): boolean;
//false if not found
"
As a bonus it works with UnciodeString. ;-)
Martin
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel