ich habe diese funktion
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21:
| function GetFileAttributes(const FileName: String): TFileAttributes; var srec: TSearchRec; begin result := []; if FindFirst(FileName, faAnyFile, srec) = 0 then begin try if (srec.Attr and faReadOnly) > 0 then result := result + [ReadOnly]; if (srec.Attr and faHidden) > 0 then result := result + [Hidden]; if (srec.Attr and faSysFile) > 0 then result := result + [SysFile]; if (srec.Attr and faVolumeId) > 0 then result := result + [VolumeId]; if (srec.Attr and faDirectory) > 0 then result := result + [Directory]; if (srec.Attr and faArchive) > 0 then result := result + [Archive]; if (srec.Attr and faAnyFile) > 0 then result := result + [AnyFile]; finally FindClose(srec); end; end; end;
FileAttribute := GetFileAttributes(PathPlusFilename); |
so...
nun habe ich FileAttribute und will das in die ListView packen.
aber wie wandel ich das FileAttribute in String um?
damit ichs so reinpacken kann: ListView1.Items[i].SubItems.Add(?FileAttribute?); // Type der Datei