mirror of
https://github.com/labwc/labwc.git
synced 2025-11-09 13:30:01 -05:00
common/file-helpers.c: share file_exists() to reduce duplication
This commit is contained in:
parent
a8951c4b75
commit
a386133068
5 changed files with 26 additions and 17 deletions
10
src/common/file-helpers.c
Normal file
10
src/common/file-helpers.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
#include <sys/stat.h>
|
||||
#include "common/file-helpers.h"
|
||||
|
||||
bool
|
||||
file_exists(const char *filename)
|
||||
{
|
||||
struct stat st;
|
||||
return (!stat(filename, &st));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue