Browse Source

+ Implemented filetruncate

michael 26 years ago
parent
commit
641d6e3304
1 changed files with 7 additions and 1 deletions
  1. 7 1
      rtl/win32/filutil.inc

+ 7 - 1
rtl/win32/filutil.inc

@@ -86,6 +86,9 @@ end;
 Function FileTruncate (Handle,Size: Longint) : boolean;
 Function FileTruncate (Handle,Size: Longint) : boolean;
 
 
 begin
 begin
+  Result:=SetFilePointer(handle,Size,nil,FILE_BEGIN)<>-1;
+  If Result then 
+    Result:=SetEndOfFile(handle);
 end;
 end;
 
 
 
 
@@ -194,7 +197,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.2  1999-02-03 11:41:30  michael
+  Revision 1.3  1999-02-09 12:01:03  michael
+  + Implemented filetruncate
+
+  Revision 1.2  1999/02/03 11:41:30  michael
   + Added filetruncate
   + Added filetruncate
 
 
   Revision 1.1  1998/10/11 12:21:01  michael
   Revision 1.1  1998/10/11 12:21:01  michael