Blender  V3.3
Macros
BLI_fileops.h File Reference

File and directory operations. More...

#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include <stddef.h>
#include <limits.h>
#include "BLI_compiler_attrs.h"
#include "BLI_fileops_types.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define PATH_MAX   4096
 

Functions

Directories
bool BLI_is_dir (const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_is_file (const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_dir_create_recursive (const char *dir) ATTR_NONNULL()
 
double BLI_dir_free_space (const char *dir) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
char * BLI_current_working_dir (char *dir, size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
eFileAttributes BLI_file_attributes (const char *path)
 
File-List
unsigned int BLI_filelist_dir_contents (const char *dir, struct direntry **r_filelist)
 
void BLI_filelist_entry_duplicate (struct direntry *dst, const struct direntry *src)
 
void BLI_filelist_duplicate (struct direntry **dest_filelist, struct direntry *const src_filelist, unsigned int nrentries)
 
void BLI_filelist_entry_free (struct direntry *entry)
 
void BLI_filelist_free (struct direntry *filelist, unsigned int nrentries)
 
void BLI_filelist_entry_size_to_string (const struct stat *st, uint64_t st_size_fallback, bool compact, char r_size[FILELIST_DIRENTRY_SIZE_LEN])
 
void BLI_filelist_entry_mode_to_string (const struct stat *st, bool compact, char r_mode1[FILELIST_DIRENTRY_MODE_LEN], char r_mode2[FILELIST_DIRENTRY_MODE_LEN], char r_mode3[FILELIST_DIRENTRY_MODE_LEN])
 
void BLI_filelist_entry_owner_to_string (const struct stat *st, bool compact, char r_owner[FILELIST_DIRENTRY_OWNER_LEN])
 
void BLI_filelist_entry_datetime_to_string (const struct stat *st, int64_t ts, bool compact, char r_time[FILELIST_DIRENTRY_TIME_LEN], char r_date[FILELIST_DIRENTRY_DATE_LEN], bool *r_is_today, bool *r_is_yesterday)
 

Common

#define FILE_ATTR_ANY_LINK
 
enum  eFileAttributes {
  FILE_ATTR_READONLY = 1 << 0 , FILE_ATTR_HIDDEN = 1 << 1 , FILE_ATTR_SYSTEM = 1 << 2 , FILE_ATTR_ARCHIVE = 1 << 3 ,
  FILE_ATTR_COMPRESSED = 1 << 4 , FILE_ATTR_ENCRYPTED = 1 << 5 , FILE_ATTR_RESTRICTED = 1 << 6 , FILE_ATTR_TEMPORARY = 1 << 7 ,
  FILE_ATTR_SPARSE_FILE = 1 << 8 , FILE_ATTR_OFFLINE = 1 << 9 , FILE_ATTR_ALIAS = 1 << 10 , FILE_ATTR_REPARSE_POINT = 1 << 11 ,
  FILE_ATTR_SYMLINK = 1 << 12 , FILE_ATTR_JUNCTION_POINT = 1 << 13 , FILE_ATTR_MOUNT_POINT = 1 << 14 , FILE_ATTR_HARDLINK = 1 << 15
}
 
typedef struct stat BLI_stat_t
 
typedef enum eFileAttributes eFileAttributes
 
int BLI_exists (const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_copy (const char *file, const char *to) ATTR_NONNULL()
 
int BLI_rename (const char *from, const char *to) ATTR_NONNULL()
 
int BLI_delete (const char *file, bool dir, bool recursive) ATTR_NONNULL()
 
int BLI_delete_soft (const char *file, const char **error_message) ATTR_NONNULL()
 
int BLI_fstat (int fd, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_stat (const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int64_t BLI_ftell (FILE *stream) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_fseek (FILE *stream, int64_t offset, int whence)
 
int64_t BLI_lseek (int fd, int64_t offset, int whence)
 

Files

#define O_BINARY   0
 
FILE * BLI_fopen (const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
voidBLI_gzopen (const char *filepath, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_open (const char *filepath, int oflag, int pmode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
int BLI_access (const char *filepath, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_file_is_writable (const char *filepath) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_file_touch (const char *file) ATTR_NONNULL()
 
bool BLI_file_alias_target (const char *filepath, char *r_targetpath) ATTR_WARN_UNUSED_RESULT
 
bool BLI_file_magic_is_gzip (const char header[4])
 
size_t BLI_file_zstd_from_mem_at_pos (void *buf, size_t len, FILE *file, size_t file_offset, int compression_level) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
size_t BLI_file_unzstd_to_mem_at_pos (void *buf, size_t len, FILE *file, size_t file_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_file_magic_is_zstd (const char header[4])
 
size_t BLI_file_descriptor_size (int file) ATTR_WARN_UNUSED_RESULT
 
size_t BLI_file_size (const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
bool BLI_file_older (const char *file1, const char *file2) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
struct LinkNodeBLI_file_read_as_lines (const char *file) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
 
voidBLI_file_read_text_as_mem (const char *filepath, size_t pad_bytes, size_t *r_size)
 
voidBLI_file_read_text_as_mem_with_newline_as_nil (const char *filepath, bool trim_trailing_space, size_t pad_bytes, size_t *r_size)
 
voidBLI_file_read_binary_as_mem (const char *filepath, size_t pad_bytes, size_t *r_size)
 
void BLI_file_free_lines (struct LinkNode *lines)
 

Detailed Description

File and directory operations.

Definition in file BLI_fileops.h.

Macro Definition Documentation

◆ FILE_ATTR_ANY_LINK

#define FILE_ATTR_ANY_LINK
Value:
FILE_ATTR_MOUNT_POINT | FILE_ATTR_HARDLINK)
@ FILE_ATTR_HARDLINK
Definition: BLI_fileops.h:102
@ FILE_ATTR_ALIAS
Definition: BLI_fileops.h:97
@ FILE_ATTR_REPARSE_POINT
Definition: BLI_fileops.h:98
@ FILE_ATTR_JUNCTION_POINT
Definition: BLI_fileops.h:100
@ FILE_ATTR_SYMLINK
Definition: BLI_fileops.h:99

Definition at line 105 of file BLI_fileops.h.

◆ O_BINARY

#define O_BINARY   0

Definition at line 319 of file BLI_fileops.h.

◆ PATH_MAX

#define PATH_MAX   4096

Definition at line 29 of file BLI_fileops.h.

Typedef Documentation

◆ BLI_stat_t

typedef struct stat BLI_stat_t

Definition at line 59 of file BLI_fileops.h.

◆ eFileAttributes

Enumeration Type Documentation

◆ eFileAttributes

Enumerator
FILE_ATTR_READONLY 
FILE_ATTR_HIDDEN 
FILE_ATTR_SYSTEM 
FILE_ATTR_ARCHIVE 
FILE_ATTR_COMPRESSED 
FILE_ATTR_ENCRYPTED 
FILE_ATTR_RESTRICTED 
FILE_ATTR_TEMPORARY 
FILE_ATTR_SPARSE_FILE 
FILE_ATTR_OFFLINE 
FILE_ATTR_ALIAS 
FILE_ATTR_REPARSE_POINT 
FILE_ATTR_SYMLINK 
FILE_ATTR_JUNCTION_POINT 
FILE_ATTR_MOUNT_POINT 
FILE_ATTR_HARDLINK 

Definition at line 86 of file BLI_fileops.h.

Function Documentation

◆ BLI_access()

int BLI_access ( const char *  filepath,
int  mode 
)

◆ BLI_copy()

int BLI_copy ( const char *  file,
const char *  to 
)

◆ BLI_current_working_dir()

char* BLI_current_working_dir ( char *  dir,
size_t  maxncpy 
)

Copies the current working directory into *dir (max size maxncpy), and returns a pointer to same.

Note
can return NULL when the size is not big enough

Definition at line 59 of file storage.c.

References BLI_getenv(), BLI_strncpy_wchar_as_utf8(), BLI_strnlen(), and NULL.

Referenced by BLI_path_abs_from_cwd().

◆ BLI_delete()

int BLI_delete ( const char *  file,
bool  dir,
bool  recursive 
)

◆ BLI_delete_soft()

int BLI_delete_soft ( const char *  file,
const char **  error_message 
)

Soft deletes the specified file or directory (depending on dir) by moving the files to the recycling bin, optionally doing recursive delete of directory contents.

Returns
zero on success (matching 'remove' behavior).

Definition at line 947 of file fileops.c.

References BLI_assert, BLI_path_is_rel(), delete_soft(), and file.

Referenced by file_delete_single().

◆ BLI_dir_create_recursive()

bool BLI_dir_create_recursive ( const char *  dir)

◆ BLI_dir_free_space()

double BLI_dir_free_space ( const char *  dir)

Returns the number of free bytes on the volume containing the specified pathname.

Note
Not actually used anywhere.

Definition at line 83 of file storage.c.

References ELEM, FILE_MAXDIR, and len.

◆ BLI_exists()

int BLI_exists ( const char *  path)

Returns the st_mode from stat-ing the specified path name, or 0 if stat fails (most likely doesn't exist or no access).

Definition at line 314 of file storage.c.

References alloc_utf16_from_8(), BLI_assert, BLI_path_is_rel(), ELEM, free(), L, len, and usdtokens::st().

Referenced by BKE_appdir_app_template_has_userpref(), BKE_appdir_font_folder_default(), BKE_appdir_program_python_search(), BKE_cachefile_filepath_get(), BKE_packedfile_compare_to_file(), BKE_packedfile_unpack_to_file(), BKE_ptcache_id_exist(), BKE_text_file_modified_check(), BKE_text_file_modified_ignore(), BKE_volume_load(), blf_dir_metrics_search(), blf_dir_search(), BLF_load_font_stack(), BLI_dir_create_recursive(), BLI_is_dir(), BLI_is_file(), BLI_path_program_search(), BLI_rename(), check_missing_files_foreach_path_cb(), blender::io::usd::copy_single_file(), blender::io::usd::copy_tiled_textures(), blender::compositor::DebugInfo::delete_operation_exports(), blender::io::alembic::AlembicExportTest::deleteArchive(), do_history(), blender::bke::AssetCatalogDefinitionFile::ensure_directory_exists(), blender::ed::asset::index::AbstractFile::exists(), blender::io::alembic::export_endjob(), blender::io::usd::export_endjob(), blender::io::usd::export_in_memory_texture(), file_delete_single(), file_directory_new_exec(), file_execute(), file_sfile_filepath_set(), filepath_drop_exec(), fsmenu_read_bookmarks(), MANTA::hasConfig(), MANTA::hasData(), MANTA::hasGuiding(), MANTA::hasMesh(), MANTA::hasNoise(), MANTA::hasParticles(), image_save_exec(), IMB_anim_proxy_get_existing(), IMB_exr_begin_read(), IMB_thumb_delete(), IMB_thumb_manage(), blender::bke::AssetCatalogService::load_directory_recursive(), missing_files_find_foreach_path_cb(), movieclip_calc_length(), namebutton_fn(), new_folder_path(), openanim(), blender::io::path_reference_copy(), RE_RenderAnim(), renamebutton_cb(), blender::bke::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), screen_opengl_render_anim_step(), seq_disk_cache_enforce_limits(), seq_disk_cache_handle_versioning(), seq_proxy_build_frame(), seq_proxy_fetch(), sequencer_export_subtitles_exec(), blender::bke::tests::TEST_F(), txt_write_file(), where_am_i(), wm_autosave_delete(), wm_autosave_location(), wm_block_create_splash(), wm_file_write(), wm_homefile_read_ex(), WM_lib_reload(), wm_lib_relocate_exec_do(), workspace_config_file_read(), workspace_system_file_read(), blender::bke::AssetCatalogDefinitionFile::write_to_disk(), and DocumentImporter::writeImage().

◆ BLI_file_alias_target()

bool BLI_file_alias_target ( const char *  filepath,
char *  r_targetpath 
)

◆ BLI_file_attributes()

eFileAttributes BLI_file_attributes ( const char *  path)

◆ BLI_file_descriptor_size()

size_t BLI_file_descriptor_size ( int  file)

Returns the file size of an opened file descriptor.

Definition at line 178 of file storage.c.

References BLI_fstat(), file, and usdtokens::st().

Referenced by BKE_packedfile_new(), build_pict_list_ex(), IMB_loadifffile(), imb_loadtilefile(), IMMapStream::IMMapStream(), prefetch_read_file_to_memory(), and proxy_thread_next_frame().

◆ BLI_file_free_lines()

void BLI_file_free_lines ( struct LinkNode lines)

Frees memory from a previous call to BLI_file_read_as_lines.

Definition at line 564 of file storage.c.

References BLI_linklist_freeN().

Referenced by make(), studiolight_load_solid_light(), wm_history_file_read(), and wm_platform_support_check_approval().

◆ BLI_file_is_writable()

bool BLI_file_is_writable ( const char *  filepath)

Returns true if the file with the specified name can be written. This implementation uses access(2), which makes the check according to the real UID and GID of the process, not its effective UID and GID. This shouldn't matter for Blender, which is not going to run privileged anyway.

Definition at line 167 of file fileops.c.

References BLI_access(), BLI_split_dirfile(), FILE_MAX, and NULL.

Referenced by image_save_exec(), sequencer_export_subtitles_exec(), txt_write_file(), and wm_file_write().

◆ BLI_file_magic_is_gzip()

bool BLI_file_magic_is_gzip ( const char  header[4])

◆ BLI_file_magic_is_zstd()

bool BLI_file_magic_is_zstd ( const char  header[4])

◆ BLI_file_older()

bool BLI_file_older ( const char *  file1,
const char *  file2 
)

Compare if one was last modified before the other.

Returns
true when is file1 older than file2.

Definition at line 569 of file storage.c.

References BLI_stat().

Referenced by imb_cache_filename(), IMB_thumb_manage(), and blender::ed::asset::index::AssetIndexFile::is_older_than().

◆ BLI_file_read_as_lines()

struct LinkNode* BLI_file_read_as_lines ( const char *  file)

Reads the contents of a text file.

Returns
the lines in a linked list (an empty list when file reading fails).

Definition at line 518 of file storage.c.

References BLI_fopen(), BLI_fseek(), BLI_ftell(), BLI_linklist_append(), BLI_strdupn(), LinkNodePair::list, MEM_freeN, MEM_mallocN, NULL, size(), and UNLIKELY.

Referenced by make(), studiolight_load_solid_light(), wm_history_file_read(), and wm_platform_support_check_approval().

◆ BLI_file_read_binary_as_mem()

void* BLI_file_read_binary_as_mem ( const char *  filepath,
size_t  pad_bytes,
size_t *  r_size 
)

Definition at line 477 of file storage.c.

References BLI_fopen(), file_read_data_as_mem_impl(), and NULL.

Referenced by BKE_icon_geom_from_file().

◆ BLI_file_read_text_as_mem()

void* BLI_file_read_text_as_mem ( const char *  filepath,
size_t  pad_bytes,
size_t *  r_size 
)

◆ BLI_file_read_text_as_mem_with_newline_as_nil()

void* BLI_file_read_text_as_mem_with_newline_as_nil ( const char *  filepath,
bool  trim_trailing_space,
size_t  pad_bytes,
size_t *  r_size 
)

Return the text file data with:

  • Newlines replaced with '\0'.
  • Optionally trim white-space, replacing trailing <space> & <tab> with '\0'.

This is an alternative to using BLI_file_read_as_lines, allowing us to loop over lines without converting it into a linked list with individual allocations.

Parameters
trim_trailing_spaceReplace trailing spaces & tabs with nil. This arguments prevents the caller from counting blank lines (if that's important).
pad_bytesWhen this is non-zero, the first byte is set to nil, to simplify parsing the file. It's recommended to pass in 1, so all text is nil terminated.

Example looping over lines:

size_t data_len;
char *data = BLI_file_read_text_as_mem_with_newline_as_nil(filepath, true, 1, &data_len);
char *data_end = data + data_len;
for (char *line = data; line != data_end; line = strlen(line) + 1) {
printf("line='%s'\n", line);
}
void * BLI_file_read_text_as_mem_with_newline_as_nil(const char *filepath, bool trim_trailing_space, size_t pad_bytes, size_t *r_size)
Definition: storage.c:488

Definition at line 488 of file storage.c.

References BLI_file_read_text_as_mem(), ELEM, and NULL.

◆ BLI_file_size()

size_t BLI_file_size ( const char *  path)

◆ BLI_file_touch()

bool BLI_file_touch ( const char *  file)

Creates the file with nothing in it, or updates its last-modified date if it already exists. Returns true if successful (like the unix touch command).

Definition at line 192 of file fileops.c.

References BLI_fopen(), Freestyle::c, file, and NULL.

Referenced by RE_RenderAnim(), blender::bke::tests::AssetCatalogTest::save_from_memory_into_existing_asset_lib(), seq_disk_cache_read_file(), and sequencer_export_subtitles_exec().

◆ BLI_file_unzstd_to_mem_at_pos()

size_t BLI_file_unzstd_to_mem_at_pos ( void buf,
size_t  len,
FILE *  file,
size_t  file_offset 
)

Definition at line 96 of file fileops.c.

References file, input, len, MEM_freeN, MEM_mallocN, output, and ret.

Referenced by inflate_file_to_imbuf().

◆ BLI_file_zstd_from_mem_at_pos()

size_t BLI_file_zstd_from_mem_at_pos ( void buf,
size_t  len,
FILE *  file,
size_t  file_offset,
int  compression_level 
)

Definition at line 49 of file fileops.c.

References file, input, len, MEM_freeN, MEM_mallocN, output, and ret.

Referenced by deflate_imbuf_to_file().

◆ BLI_filelist_dir_contents()

unsigned int BLI_filelist_dir_contents ( const char *  dir,
struct direntry **  r_filelist 
)

◆ BLI_filelist_duplicate()

void BLI_filelist_duplicate ( struct direntry **  dest_filelist,
struct direntry *const  src_filelist,
unsigned int  nrentries 
)

Deep-duplicate of a direntry array including the array itself.

Definition at line 396 of file BLI_filelist.c.

References BLI_filelist_entry_duplicate(), MEM_mallocN, and src.

◆ BLI_filelist_entry_datetime_to_string()

void BLI_filelist_entry_datetime_to_string ( const struct stat *  st,
int64_t  ts,
bool  compact,
char  r_time[FILELIST_DIRENTRY_TIME_LEN],
char  r_date[FILELIST_DIRENTRY_DATE_LEN],
bool r_is_today,
bool r_is_yesterday 
)

Convert given entry's time into human-readable strings.

Parameters
r_is_todayoptional, returns true if the date matches today's.
r_is_yesterdayoptional, returns true if the date matches yesterday's.

Definition at line 323 of file BLI_filelist.c.

References FILELIST_DIRENTRY_DATE_LEN, FILELIST_DIRENTRY_TIME_LEN, NULL, usdtokens::st(), and time.

Referenced by filelist_get_details_column_string(), and wm_open_mainfile_description().

◆ BLI_filelist_entry_duplicate()

void BLI_filelist_entry_duplicate ( struct direntry dst,
const struct direntry src 
)

Deep-duplicate of a single direntry.

Definition at line 385 of file BLI_filelist.c.

References MEM_dupallocN, direntry::path, direntry::relname, and src.

Referenced by BLI_filelist_duplicate().

◆ BLI_filelist_entry_free()

void BLI_filelist_entry_free ( struct direntry entry)

Frees storage for a single direntry, not the direntry itself.

Definition at line 410 of file BLI_filelist.c.

References MEM_freeN, direntry::path, and direntry::relname.

Referenced by BLI_filelist_free().

◆ BLI_filelist_entry_mode_to_string()

void BLI_filelist_entry_mode_to_string ( const struct stat *  st,
bool  compact,
char  r_mode1[FILELIST_DIRENTRY_MODE_LEN],
char  r_mode2[FILELIST_DIRENTRY_MODE_LEN],
char  r_mode3[FILELIST_DIRENTRY_MODE_LEN] 
)

Convert given entry's modes into human-readable strings.

◆ BLI_filelist_entry_owner_to_string()

void BLI_filelist_entry_owner_to_string ( const struct stat *  st,
bool  compact,
char  r_owner[FILELIST_DIRENTRY_OWNER_LEN] 
)

Convert given entry's owner into human-readable strings.

◆ BLI_filelist_entry_size_to_string()

void BLI_filelist_entry_size_to_string ( const struct stat *  st,
uint64_t  st_size_fallback,
bool  compact,
char  r_size[FILELIST_DIRENTRY_SIZE_LEN] 
)

Convert given entry's size into human-readable strings.

Referenced by filelist_get_details_column_string(), and wm_open_mainfile_description().

◆ BLI_filelist_free()

void BLI_filelist_free ( struct direntry filelist,
unsigned int  nrentries 
)

◆ BLI_fopen()

FILE* BLI_fopen ( const char *  filepath,
const char *  mode 
)

Definition at line 906 of file fileops.c.

References BLI_assert, and BLI_path_is_rel().

Referenced by arg_handle_log_file_set(), AVI_is_avi(), AVI_open_compress(), AVI_open_movie(), BKE_report_write_file(), BLI_file_read_as_lines(), BLI_file_read_binary_as_mem(), BLI_file_read_text_as_mem(), BLI_file_touch(), cdf_read_open(), cdf_write_open(), blender::io::obj::obj_mtl_parser_test::check_string(), cineonCreate(), cineonOpen(), dpxCreate(), dpxOpen(), EEVEE_lut_update_ggx_brdf(), EEVEE_lut_update_ggx_btdf(), fsmenu_read_bookmarks(), fsmenu_write_file(), fsmenu_xdg_user_dirs_parse(), blender::compositor::DebugInfo::graphviz(), IMB_index_builder_create(), IMB_indexer_open(), imb_savebmp(), imb_savehdr(), imb_savepng(), imb_savetarga(), imb_savewebp(), imb_thumbnail_jpeg(), blender::io::stl::importer_main(), logImageOpenFromFile(), make(), MOD_meshcache_read_mdd_times(), MOD_meshcache_read_pc2_times(), blender::io::obj::MTLWriter::MTLWriter(), blender::io::obj::OBJParser::OBJParser(), blender::io::obj::OBJWriter::OBJWriter(), opj_stream_create_from_file(), output_iris(), ptcache_file_open(), python_script_exec(), save_stdjpeg(), seq_disk_cache_create_version_file(), seq_disk_cache_handle_versioning(), seq_disk_cache_read_file(), seq_disk_cache_write_file(), sequencer_export_subtitles_exec(), sig_handle_crash(), studiolight_calculate_diffuse_light(), studiolight_load_spherical_harmonics_coefficients(), studiolight_write_solid_light(), txt_write_file(), wm_history_file_write(), and wm_platform_support_check_approval().

◆ BLI_fseek()

int BLI_fseek ( FILE *  stream,
int64_t  offset,
int  whence 
)

◆ BLI_fstat()

int BLI_fstat ( int  fd,
BLI_stat_t buffer 
)

◆ BLI_ftell()

int64_t BLI_ftell ( FILE *  stream)

◆ BLI_gzopen()

void* BLI_gzopen ( const char *  filepath,
const char *  mode 
)

Definition at line 913 of file fileops.c.

References BLI_assert, and BLI_path_is_rel().

Referenced by MANTA::readConfiguration(), and MANTA::writeConfiguration().

◆ BLI_is_dir()

bool BLI_is_dir ( const char *  path)

◆ BLI_is_file()

bool BLI_is_file ( const char *  path)

◆ BLI_lseek()

int64_t BLI_lseek ( int  fd,
int64_t  offset,
int  whence 
)

Definition at line 169 of file storage.c.

References offset.

Referenced by BLI_filereader_new_mmap(), BLI_mmap_open(), and file_seek().

◆ BLI_open()

int BLI_open ( const char *  filepath,
int  oflag,
int  pmode 
)

◆ BLI_rename()

int BLI_rename ( const char *  from,
const char *  to 
)

◆ BLI_stat()

int BLI_stat ( const char *  path,
BLI_stat_t buffer 
)