代码大全

(singke) #1

begin
MakePurgeFileList ( FileList , NumFilesToPurge );
ErrorState := Success ;


While

ErrorState

FileIndex := 0;
While ( FileIndex < NumFilesToPurge ) and ( ErrorState = Success ) do
begin
FileIndex := FileIndex + 1;
if not FindFile( FileList[ FileIndex ] , FileHandle ) then
begin
ErrorState := FileFindError;
end;
if ( ErrorState = Success ) then
begin
if not OpenFile( FileHandle ) then
begin
ErrorState := FileOpenError
end
end;
if ( ErrorState = Success ) then
begin
if not OverwriteFile( FileHandle ) then
begin
ErrorState := FileOverwriteError
end
end;
if ( ErrorState = Success ) then
begin
if not Erase( FileHandle ) then
begin
ErrorState := FileEraseError
end
end
end; {while}
DeletePurgeFileList( FileList , NumFilesToPurge )
end; {PurgeFiles}

Free download pdf