Hi,
Yeh, I tried this also, problem is it was very slow, took several minutes on my machine, could of course be a problem with my machine. I also tried pre-creating a 4 meg file full of FF's and masking the data over it, this was very fast and worked but I will need to do padding for 8M, 16M and possibly 32M in the future. I will look at the fileWrite method now and see what I come up with as I havent looked at that function yet.
Thanks, keep those ideas coming!
Main Topics
Browse All Topics





by: Moroni24Posted on 2004-07-20 at 10:56:35ID: 11595452
What methods have your tried?
Have you tried using "write" within a loop?
procedure Write(F, V1,...,Vn);
Description
Write writes a file to a file component. F is a file variable, and each V is a variable of the same type as the component type of F. For each variable written, the current file position is advanced to the next component. If the current file position is at the end of the file (that is, if Eof(F) is True), the file is expanded.
Below is an example, it won't compile, but you should get the idea.
padding := $FF's
maxFileSize := 4meg;
while filePos(file) < maxFileSize do begin
write(file,padding);
end;
You could also look at the fileWrite method