mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -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));
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@ labwc_sources += files(
|
|||
'buf.c',
|
||||
'dir.c',
|
||||
'fd_util.c',
|
||||
'file-helpers.c',
|
||||
'font.c',
|
||||
'grab-file.c',
|
||||
'graphic-helpers.c',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue