diff options
Diffstat (limited to 'source/blender/blenlib/intern/storage.c')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index 1ef254d355f..001b191155d 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -471,6 +471,12 @@ int BLI_is_dir(const char *file) return S_ISDIR(BLI_exists(file)); } +int BLI_is_file(const char *path) +{ + int mode= BLI_exists(path); + return (mode && !S_ISDIR(mode)); +} + LinkNode *BLI_file_read_as_lines(const char *name) { FILE *fp= fopen(name, "r"); |