-----------------------------------------------------------------------------
| 48 | |
| 49 | //----------------------------------------------------------------------------- |
| 50 | bool dFileDelete(const char * name) |
| 51 | { |
| 52 | AssertFatal( name != NULL, "dFileDelete - NULL file name" ); |
| 53 | |
| 54 | TempAlloc< TCHAR > buf( dStrlen( name ) + 1 ); |
| 55 | |
| 56 | #ifdef UNICODE |
| 57 | convertUTF8toUTF16N( name, buf, buf.size ); |
| 58 | #else |
| 59 | dStrcpy( buf, name, buf.size ); |
| 60 | #endif |
| 61 | |
| 62 | backslash( buf ); |
| 63 | if( Platform::isFile( name ) ) |
| 64 | return DeleteFile( buf ); |
| 65 | else |
| 66 | return RemoveDirectory( buf ); |
| 67 | } |
| 68 | |
| 69 | bool Platform::fileDelete(const char * name) |
| 70 | { |