summaryrefslogtreecommitdiffstats
path: root/utf8.c
diff options
context:
space:
mode:
Diffstat (limited to 'utf8.c')
-rw-r--r--utf8.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/utf8.c b/utf8.c
index 36354277..26e5795d 100644
--- a/utf8.c
+++ b/utf8.c
@@ -383,3 +383,21 @@ FILE *w_freopen(const wchar_t *wname, const wchar_t *wmode, FILE *fold)
free(mode);
return f;
}
+
+int w_remove(const wchar_t *wpath)
+{
+ char *path = utf8_dup_to(wpath);
+ int err = remove(path);
+ free(path);
+ return err;
+}
+
+int w_rename(const wchar_t *wfrom, const wchar_t *wto)
+{
+ char *from = utf8_dup_to(wfrom);
+ char *to = utf8_dup_to(wto);
+ int err = rename(from, to);
+ free(to);
+ free(from);
+ return err;
+}