ePass1000 C/C++ API Reference Manual Version 2.0 |
The epas_DeleteFile function permanently delete a file in the current directory. Applications must have changed current directory to the directory under which file is to be delete by invoking epas_ChangeDir. Application must also have the proper privilege to delete a file.
EPAS_STATUS EPAS_API epas_DeleteFile( EPAS_HANDLE hContextHandle, // [in] unsigned long ulFlags, // [in] unsigned long ulFileID // [in] );
epas_CreateContext, epas_OpenDevice, epas_ChangeDir
File deletion access is controlled through the Global Access Control of the device. To obtain the Global Access Control, use the epas_GetProperty function. To set the Global Access Control, use the epas_SetProperty function.
For a list of reserved file IDs, see EPAS_FILEINFO.
If the function succeeds, FT_SUCCESS returned.
If file deletion access is not granted, FT_ACCESS_DENIED is returned.
If a file with the given ID does not exist, FT_FILE_NOT_FOUND is returned.
For a list of all return codes, see Error Code Values.
EPAS_STATUS epsRet; EPAS_HANDLE handle; . . . epsRet = epas_DeleteFile(handle,0,DEMO_FILE_ID); . . .
epas_CreateFile, epas_OpenFile, epas_CloseFile, epas_GetFileInfo, epas_Read, epas_Write, epas_CreateDir, epas_DeleteDir, epas_GetCurrentDir, epas_ChangeDir, epas_Directory