diff options
author | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 19:31:41 +0100 |
---|---|---|
committer | Barrucadu <mike@barrucadu.co.uk> | 2009-04-26 19:31:41 +0100 |
commit | e821515a4d95f39d72e9a298fb920a228300d90b (patch) | |
tree | 489102198b288fdb35eb51694278e8a4e3a68921 /uzbl.c | |
parent | 980afc2a913058099720ec56924249f4da52e2f3 (diff) |
Added file_exists function (will be used to check for config file).
Diffstat (limited to 'uzbl.c')
-rw-r--r-- | uzbl.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -179,6 +179,16 @@ static Command commands[] = /* -- CORE FUNCTIONS -- */ +static bool +file_exists (const char * filename) +{ + if (FILE * file = fopen (filename, "r")) { + fclose (file); + return true; + } + return false; +} + // make sure to put '' around args, so that if there is whitespace we can still keep arguments together. static gboolean run_command(const char *command, const char *args) { |