fileAppend
This commit is contained in:
parent
dafef7853d
commit
b10456a264
|
@ -35,6 +35,7 @@ Function FileCopy (Source, Target: String) : Boolean;
|
||||||
Function FileFind (FN: String) : String;
|
Function FileFind (FN: String) : String;
|
||||||
Function FileByteSize (FN: String) : Int64;
|
Function FileByteSize (FN: String) : Int64;
|
||||||
Function FileNewExt (FN, NewExt: String) : String;
|
Function FileNewExt (FN, NewExt: String) : String;
|
||||||
|
Procedure FileAppend (F1, F2: String);
|
||||||
|
|
||||||
{ GLOBAL FILEIO VARIABLES AND CONSTANTS }
|
{ GLOBAL FILEIO VARIABLES AND CONSTANTS }
|
||||||
|
|
||||||
|
@ -561,6 +562,39 @@ Begin
|
||||||
Result := FN + '.' + NewExt;
|
Result := FN + '.' + NewExt;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Procedure FileAppend (F1, F2: String);
|
||||||
|
Var
|
||||||
|
BufIn,
|
||||||
|
BufOut : Array[1..8*1024] of Char;
|
||||||
|
TF1 : Text;
|
||||||
|
TF2 : Text;
|
||||||
|
Str : String;
|
||||||
|
Begin
|
||||||
|
Assign (TF1, F1);
|
||||||
|
|
||||||
|
{$I-} Reset(TF1); {$I+}
|
||||||
|
|
||||||
|
If IoResult <> 0 Then Exit;
|
||||||
|
|
||||||
|
SetTextBuf (TF1, BufIn);
|
||||||
|
|
||||||
|
Assign (TF2, F2);
|
||||||
|
{$I-} Append(TF2); {$I+}
|
||||||
|
|
||||||
|
If (IoResult = 2) Then
|
||||||
|
ReWrite (TF2);
|
||||||
|
|
||||||
|
SetTextBuf (TF2, BufOut);
|
||||||
|
|
||||||
|
While Not Eof(TF1) Do Begin
|
||||||
|
ReadLn (TF1, Str);
|
||||||
|
WriteLn (TF2, Str);
|
||||||
|
End;
|
||||||
|
|
||||||
|
Close (TF1);
|
||||||
|
Close (TF2);
|
||||||
|
End;
|
||||||
|
|
||||||
{ FILE STREAMING FUNCTIONS }
|
{ FILE STREAMING FUNCTIONS }
|
||||||
|
|
||||||
Constructor TFileBuffer.Create (BufferSize: LongInt);
|
Constructor TFileBuffer.Create (BufferSize: LongInt);
|
||||||
|
|
Loading…
Reference in New Issue