mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 14:20:38 +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;
|
||||
ADelimiter:Char=','; CSVEncoding:TCSVEncoding=ceAuto);
|
||||
procedure LoadFromCSVFile(aFilename: string; AProc: TCSVRecordProc;
|
||||
ADelimiter:Char=','; CSVEncoding:TCSVEncoding=ceAuto);
|
||||
|
||||
implementation
|
||||
|
||||
@ -262,5 +264,18 @@ begin
|
||||
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.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user