## FSIZE Read file-size and component-range information

The FSIZE function returns information about the size of a file and the range of its components. The syntax is:

          R  FSIZE TIENO {PASS}

TIENO is the tie number you used to tie or create the file (or the tie number returned by APLX if you tied or created it using 0 instead of your own tie number). If you tied the file using a pass number, you must provide the same pass number, as the PASS parameter.

The explicit result is a five-element integer vector:

1. The number of the first component in the file

2. The next available component number (i.e. current highest + 1)

3. The file size currently used (including unused space), in bytes

4. The file size limit (set using FRESIZE) in bytes; 0 means unlimited

5. The approximate number of bytes of unused space that would be reclaimed by FDUP

As you write components to a file, and delete existing components, APLX attempts to make the freed-up space available for future use. However, in some cases the file may become fragmented, and the amount of unused space may increase over time. The fifth element of the result of FSIZE is useful in deciding whether to make a clean copy of the file (using FDUP), thus reclaiming the space.

Topic: APLX Help : Help on APL language : System Functions & Variables : FSIZE Read file-size and component-range information

[ Previous | Next | Contents | Index ]