/* * util_unlink -- unlinks a file or zeroes a device dax */ int util_unlink(const char *path) { if (util_file_is_device_dax(path)) { return util_file_zero_whole(path); } else { return unlink(path); } }
/* * util_unlink -- unlinks a file or zeroes a device dax */ int util_unlink(const char *path) { if (util_file_is_device_dax(path)) { return util_file_zero_whole(path); } else { /* * On Windows we can not unlink Read-Only files */ #ifdef _WIN32 _chmod(path, _S_IREAD | _S_IWRITE); #endif return unlink(path); } }