## Ó File drop

### One-argument form

Deletes a component within a file. The right argument identifies the file or component to be dropped. A file is identified by its file number and a component is identified by the number of the file it's in, and its own number within that file.

The full form of Ó is ({} means optional):

                 R „ Ó {[LIBRARY]} FILE,COMPONENT {,USER,PASSWORD}

R (the result) is 1 if the operation was successful, and 0 if not.

LIBRARY number identifies the library volume which holds the file to be accessed. If you omit the library number, library 0 is assumed. If included, the library number is put in square brackets. (see also the entry on ŒMOUNT for discussion of library numbers)

FILE number is the number of the file to be accessed.

COMPONENT number is the number identifying the component to be deleted. If 0 the last component is deleted. If the component is not specified, the number will be assumed to be 0.

USER number is the number of the owner of the file. If omitted, defaults to 1†ŒAI, i.e. your own user number.

PASSWORD is the optional number designated as a security password 0 is assumed if the password is omitted.

APLX will return a code 1 to indicate that it has successfully carried out the operation, otherwise a 0 is returned.

                 Ó 2 100                 (Delete component 100 in file 2)
           1
                 Ó[1]4 222               (Delete component 222 of file 4 which is
           1                              on library volume 1)

### Two-argument form

Deletes an entire file from the system. The form is ({} means optional):

                 R„USER Ó {[LIBRARY]} FILE,0, {USER,PASSWORD}

where R, USER, LIBRARY, FILE, PASSWORD are as defined above.

Note: By default, a user is denied the privilege of deleting an entire file, even his own. In order to delete a file, the owner must first grant himself the deletion privilege by adjusting the Access matrix (see section on Ô).

Topic: APLX Help : Help on APL language : APL Primitives : Ó File drop

[ Previous | Next | Contents | Index ]