UNLINK

Portability Function: Deletes the file given by path.

Module

USE IFPORT

構文

result = UNLINK (name)

name

(Input) Character*(*). Path of the file to delete. The path can use forward (/) or backward (\) slashes as path separators and can contain drive letters.

Results

The result type is INTEGER(4). The result is zero if successful; otherwise, an error code. Errors can be one of the following:

You must have adequate permission to delete the specified file.

On Windows systems, you will get the EACCES error if the file has been opened by any process.

Compatibility

CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS WINDOWS DLL LIB

 USE IFPORT
 INTEGER(4) ISTATUS
 CHARACTER*20 dirname
 READ *, dirname
 ISTATUS = UNLINK (dirname)
 IF (ISTATUS) then
    print *, 'Error ', ISTATUS
 END IF
 END

関連情報


このヘルプトピックについてのフィードバックを送信

© 1996-2011 Intel Corporation. 無断での引用、転載を禁じます。