On Monday 02 October 2017 15:55:25 fredvs wrote:
> Hello Martin.
>
> I try to get the infos of a tfilelistview to store into a tstringgrid to
> have a "extended" filelist .
>
> For this I did:
>
> var
> demogrid : tstringgrid;
> list_files : tfilelistview;
> ...
>
> demogrid.rowcount := list_files.filelist.count;
>
> for x := 0 to list_files.filelist.count -1 do
> begin
> demogrid[0][x] := list_files.filelist.items[x].name;
> demogrid[1][x] := fileext(list_files.filelist.items[x].name);
> demogrid[2][x] := inttostr(list_files.filelist.items[x].extinfo1.size);
> demogrid[3][x] :=
> formatdatetime('YYYY-MM-DD',list_files.filelist.items[x].extinfo1.accesstim
>e); end;
>
> The result is ok for demogrid[0][x] and demogrid[1][x].
>
> But for demogrid[2][x] ---> 0 ---> for each file.
>
> And for demogrid[3][x] ---> 1899-12-30 --> for each file.
> Idem using modtime, accesstime or ctime --> 1899-12-30.
>
> What is wrong ?
>
Use a tfiledatalist instead of a tfilelistview, in 
tfiledatalist.adddirectory() set "ainfolevel" to "fil_ext1". Fetching file 
size and accesstimes needs more time so it is not done by default 
with "fil_name".

Martin

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
mseide-msegui-talk mailing list
mseide-msegui-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk

Reply via email to