mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-04 13:00:31 +02:00
LazUtils, cvsutils: load from file version
git-svn-id: trunk@48825 -
This commit is contained in:
parent
f86b0cb7af
commit
54dee07964
@ -14,6 +14,8 @@ type
|
|||||||
|
|
||||||
procedure LoadFromCSVStream(AStream:TStream; AProc: TCSVRecordProc;
|
procedure LoadFromCSVStream(AStream:TStream; AProc: TCSVRecordProc;
|
||||||
ADelimiter:Char=','; CSVEncoding:TCSVEncoding=ceAuto);
|
ADelimiter:Char=','; CSVEncoding:TCSVEncoding=ceAuto);
|
||||||
|
procedure LoadFromCSVFile(aFilename: string; AProc: TCSVRecordProc;
|
||||||
|
ADelimiter:Char=','; CSVEncoding:TCSVEncoding=ceAuto);
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
@ -262,5 +264,18 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure LoadFromCSVFile(aFilename: string; AProc: TCSVRecordProc;
|
||||||
|
ADelimiter: Char; CSVEncoding: TCSVEncoding);
|
||||||
|
var
|
||||||
|
Stream: TFileStream;
|
||||||
|
begin
|
||||||
|
Stream := TFileStream.Create(aFilename, fmOpenRead);
|
||||||
|
try
|
||||||
|
LoadFromCSVStream(Stream, AProc, ADelimiter, CSVEncoding);
|
||||||
|
finally
|
||||||
|
Stream.Free;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user