diff options
author | jsorg71 <jsorg71> | 2005-11-05 23:51:10 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2005-11-05 23:51:10 +0000 |
commit | 97b1407d916c4da6b25983e901cef231659034a5 (patch) | |
tree | 2f37300a702723681fcc1eb8cac8b5305844b254 /common | |
parent | 489fddf5f2dd68b94749fe4cfd43c35269d465be (diff) | |
download | xrdp-proprietary-97b1407d916c4da6b25983e901cef231659034a5.tar.gz xrdp-proprietary-97b1407d916c4da6b25983e901cef231659034a5.zip |
added file delete
Diffstat (limited to 'common')
-rw-r--r-- | common/os_calls.c | 12 | ||||
-rw-r--r-- | common/os_calls.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/common/os_calls.c b/common/os_calls.c index 4d78887c..366a4832 100644 --- a/common/os_calls.c +++ b/common/os_calls.c @@ -585,6 +585,18 @@ g_file_exist(char* filename) } /*****************************************************************************/ +/* returns non zero if the file was deleted */ +int +g_file_delete(char* filename) +{ +#if defined(_WIN32) + return DeleteFile(filename); +#else + return unlink(filename) != -1; +#endif +} + +/*****************************************************************************/ int g_strlen(char* text) { diff --git a/common/os_calls.h b/common/os_calls.h index 2fd0f6f0..cf26cf20 100644 --- a/common/os_calls.h +++ b/common/os_calls.h @@ -102,6 +102,8 @@ g_set_current_dir(char* dirname); int g_file_exist(char* filename); int +g_file_delete(char* filename); +int g_strlen(char* text); char* g_strcpy(char* dest, char* src); |