Shell Commands/PFSMakeRollover

From MorphOS Library

< Shell Commands

PFSMakeRollover - Creates rollover files

FILE/A, SIZE/N/A

FILE - The name of the new rollover file.
SIZE - The 'rollover size' of the new rollover file in blocks.

Initially the rollover file will be empty, it has size 0. The rolloversize is the maximum size the rollover file can become. It always is a multiple of blocks minus one for the end of file marker.

Example:

1.Workbench:> Makerollover mylogfile 2

will create a rollover file named 'mylogfile' with rollover size 2*512-1 = 1023 byte.

Makerollover always creates a new file, it cannot transform an existing file into a rollover file. To transform a normal file into a rollover file, you have to copy it into a rollover file.

Example: turning mybiglog into a 1023 byte rollover file:

1.Workbench:> rename mybiglog temp
1.Workbench:> makerollover mybiglog 2
1.Workbench:> copy temp mybiglog
1.Workbench:> delete temp