.lo 3,2 .lm 0.rm 72 .fl bold.fl break.fl capitalize.fl hyphenate.fl index.xl.fl period .nhd .c;^*DELETE__FID - Delete File by File ID\* .b .c;by ^&Rodrick A. Eldridge\& ^* .hl1 Introduction \* .b The DELETE__FID routine will delete the file specified by it's file ID. .b If a non-zero directory ID is specified, the file name must also be specified, and the routine will also remove the file name's entry from the directory. .b If the file ID points to a directory file, it will be deleted even if the directory contains other files or subdirectories. .tp 7 ^* .hl1 Using DELETE__FID \* ^* .hl2 Format \* The following shows the format of the DELETE__FID program: .b .lt DELETE_FID work-area,device-name,file-name .el .b .tp 5 ^* .hl2 Arguments \* .lm 9 .i -9 ^&work-area\& .b The work area is a record structure that contains the following fields. The ^&work-area\& argument is the address of this record structure. For each difference device specified, you must have a separate work area. .lm 18 .b .tp 5 .i -9 ^&io-chan\& .b I_/O channel that is assigned to the device from which the file will be deleted. The ^&io-chan\& argument is a word value containing the number of the I_/O channel and this number must be zero on the initial call to this routine. .b .tp 5 .i -9 ^&file-id\& .b File ID of the file to be deleted. The ^&file-id\& argument is a record structure of 3 words that contain the file ID. .b If the file ID points to a directory file, it will be deleted even if the directory contains other files or subdirectories. .b After all calls have been made to the DELETE__FID routine for the specified device, set the ^&file-id\& structure to zero and call this routine one last time to deassign the channel assigned to the device specified. .b .tp 5 .i -9 ^&directory-id\& .b The directory ID of the directory that contains the file to be deleted. The ^&directory-id\& argument is a record structure of 3 words that contain the directory ID. .b If a non-zero directory ID is specified, the file name must also be specified, and the routine will remove the file name's entry from the directory. If the direcotry ID structure is zero, no attempt will be made to remove the file name's entry from the directory. .lm 9 .b .tp 5 .i -9 ^&device-name\& .b The device name of where the file is located. The ^&device-name\& argument is the address of a descriptor pointing to this device name. The trailing colon (i.e. _:) must be included as part of the device name. .b .tp 5 .i -9 ^&file-name\& .b The file name of the file to be deleted. The ^&file-name\& argument is the address of a descriptor pointing to this file name. .b If a non-zero directory ID is specified, the file name must be specified, and the routine will remove the file name's entry from the directory. .lm 0 ^* .hl2 Linking \* .b To use the DELETE__FID routine, link your program to the TOOLS.OLB library in ISU__COMMON:[LIB]. .b For example: .b .lt LINK your_program+ISU_COMMON:[LIB]TOOLS/LIBR .el .b .tp 7 ^* .hl1 Condition Values Returned \* The following condition values may be returned by the DELETE__FID routine: .b .lm 9 .i -9 ^*SS$__NORMAL\* .b Routine successfully completed. .b .tp 3 .i -9 ^*SS$__INSFARG\* .b The argument list contained fewer than the three required arguments. .b .tp 3 .i -9 Any condition values returned by ^*SYS$ASSIGN\*. .b .tp 3 .i -9 Any condition values returned by ^*SYS$DASSGN\*. .b .tp 3 .i -9 Any condition values returned by ^*SYS$QIO\*. .lm 0