1 /* 2 Copyright (C) 2015-2021, Dirk Krause 3 SPDX-License-Identifier: BSD-3-Clause 4 */ 5 6 /* 7 WARNING: This file was generated by the dkct program (see 8 http://dktools.sourceforge.net/ for details). 9 Changes you make here will be lost if dkct is run again! 10 You should modify the original source and run dkct on it. 11 Original source: dk4delfile08.ctr 12 */ 13 14 #ifndef DK4DELFILE08_H_INCLUDED 15 /** Avoid multiple inclusions. */ 16 #define DK4DELFILE08_H_INCLUDED 1 17 18 19 /** @file 20 Remove file specified by char text. 21 22 CRT on Windows: Optional. 23 */ 24 25 26 #ifndef DK4CONF_H_INCLUDED 27 #if DK4_BUILDING_DKTOOLS4 28 #include "dk4conf.h" 29 #else 30 #include <dktools-4/dk4conf.h> 31 #endif 32 #endif 33 34 #ifndef DK4TYPES_H_INCLUDED 35 #if DK4_BUILDING_DKTOOLS4 36 #include <libdk4base/dk4types.h> 37 #else 38 #include <dktools-4/dk4types.h> 39 #endif 40 #endif 41 42 #ifndef DK4ERROR_H_INCLUDED 43 #if DK4_BUILDING_DKTOOLS4 44 #include <libdk4base/dk4error.h> 45 #else 46 #include <dktools-4/dk4error.h> 47 #endif 48 #endif 49 50 #ifdef __cplusplus 51 extern "C" { 52 #endif 53 54 /** Remove one file. 55 @param fn File name. 56 @param erp Error report, may be NULL. 57 @return 1 on success, 0 on error. 58 59 Error codes: 60 - DK4_E_INVALID_ARGUMENTS<br> 61 if fn is NULL, 62 - DK4_E_NOT_SUPPORTED<br> 63 if no system function was found to delete files, 64 - DK4_E_UNLINK_FAILED<br> 65 with errno value in idetails if the unlink operation failed, 66 - DK4_E_DELETE_FILE_FAILED<br> 67 with GetLastError() value in lDetails1 if the DeleteFile() function 68 failed on Windows. 69 */ 70 int 71 dk4delete_file_c8(const char *fn, dk4_er_t *erp); 72 73 #ifdef __cplusplus 74 } 75 #endif 76 77 78 79 80 #endif 81