|
@@ -1963,8 +1963,19 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
class function TFile.OpenText(const aPath: string): TStreamReader;
|
|
class function TFile.OpenText(const aPath: string): TStreamReader;
|
|
-begin
|
|
|
|
|
|
|
|
|
|
+var
|
|
|
|
+ F : TFileStream;
|
|
|
|
+
|
|
|
|
+begin
|
|
|
|
+ Result:=Nil;
|
|
|
|
+ F:=TFilestream.Create(aPath,fmOpenRead or fmShareDenyWrite);
|
|
|
|
+ try
|
|
|
|
+ Result := TStreamReader.Create(F,BUFFER_SIZE,True);
|
|
|
|
+ except
|
|
|
|
+ F.Free;
|
|
|
|
+ Raise;
|
|
|
|
+ end
|
|
end;
|
|
end;
|
|
|
|
|
|
class function TFile.OpenWrite(const aPath: string): TFileStream;
|
|
class function TFile.OpenWrite(const aPath: string): TFileStream;
|