Skip to content

Commit

Permalink
file deletion utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
lloyd committed Feb 6, 2009
1 parent 98c850f commit b2f1062
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
14 changes: 14 additions & 0 deletions elzma/util.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "util.h"

#ifdef WIN32
#include <stdio.h>
#define unlink _unlink
#else
#include <unistd.h>
#endif

int
deleteFile(const char * path)
{
return unlink(path);
}
7 changes: 7 additions & 0 deletions elzma/util.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef __UTIL_H__
#define __UTIL_H__

/* delete a file, nonzero on failure */
int deleteFile(const char * fname);

#endif

0 comments on commit b2f1062

Please sign in to comment.