LazUtils, cvsutils: load from file version

git-svn-id: trunk@48825 -
This commit is contained in:
jesus 2015-04-24 04:53:00 +00:00
parent f86b0cb7af
commit 54dee07964

View File

@ -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.