|
Blender
V2.93
|
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_utildefines.h"Go to the source code of this file.
Macros | |
| #define | PATH_MAX 4096 |
| #define | FILE_ATTR_ANY_LINK |
| #define | O_BINARY 0 |
Typedefs | |
| typedef struct stat | BLI_stat_t |
| typedef enum eFileAttributes | eFileAttributes |
Enumerations | |
| 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 } |
Functions | |
| 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) |
| 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, const size_t maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| eFileAttributes | BLI_file_attributes (const char *path) |
| 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, const unsigned int nrentries) |
| void | BLI_filelist_entry_free (struct direntry *entry) |
| void | BLI_filelist_free (struct direntry *filelist, const unsigned int nrentries) |
| void | BLI_filelist_entry_size_to_string (const struct stat *st, const uint64_t sz, const bool compact, char r_size[]) |
| void | BLI_filelist_entry_mode_to_string (const struct stat *st, const bool compact, char r_mode1[], char r_mode2[], char r_mode3[]) |
| void | BLI_filelist_entry_owner_to_string (const struct stat *st, const bool compact, char r_owner[]) |
| void | BLI_filelist_entry_datetime_to_string (const struct stat *st, const int64_t ts, const bool compact, char r_time[], char r_date[], bool *r_is_today, bool *r_is_yesterday) |
| FILE * | BLI_fopen (const char *filename, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| void * | BLI_gzopen (const char *filename, const char *mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| int | BLI_open (const char *filename, int oflag, int pmode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| int | BLI_access (const char *filename, int mode) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| bool | BLI_file_is_writable (const char *file) 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 |
| char * | BLI_file_ungzip_to_mem (const char *from_file, int *r_size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| size_t | BLI_gzip_mem_to_file_at_pos (void *buf, size_t len, FILE *file, size_t gz_stream_offset, int compression_level) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| size_t | BLI_ungzip_file_to_mem_at_pos (void *buf, size_t len, FILE *file, size_t gz_stream_offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| 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 LinkNode * | BLI_file_read_as_lines (const char *file) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() |
| void * | BLI_file_read_text_as_mem (const char *filepath, size_t pad_bytes, size_t *r_size) |
| 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) |
| void * | BLI_file_read_binary_as_mem (const char *filepath, size_t pad_bytes, size_t *r_size) |
| void | BLI_file_free_lines (struct LinkNode *lines) |
File and directory operations.
Definition in file BLI_fileops.h.
| #define FILE_ATTR_ANY_LINK |
Definition at line 99 of file BLI_fileops.h.
| #define O_BINARY 0 |
Definition at line 182 of file BLI_fileops.h.
| #define PATH_MAX 4096 |
Definition at line 44 of file BLI_fileops.h.
| typedef struct stat BLI_stat_t |
Definition at line 53 of file BLI_fileops.h.
| typedef enum eFileAttributes eFileAttributes |
| enum eFileAttributes |
Definition at line 80 of file BLI_fileops.h.
| int BLI_access | ( | const char * | filename, |
| int | mode | ||
| ) |
Definition at line 1024 of file fileops.c.
References BLI_assert, and BLI_path_is_rel().
Referenced by bli_builddir(), BLI_file_is_writable(), BLI_path_parent_dir_until_exists(), seq_proxy_multiview_context_invalid(), wm_homefile_read(), and wm_homefile_read_exec().
| int BLI_copy | ( | const char * | file, |
| const char * | to | ||
| ) |
Definition at line 1307 of file fileops.c.
References check_destination(), copy_callback_pre(), copy_single_file(), file, MEM_freeN, NULL, recursive_operation(), and ret.
Referenced by BKE_packedfile_compare_to_file(), and DocumentExporter::exportCurrentScene().
| char* BLI_current_working_dir | ( | char * | dir, |
| const size_t | maxncpy | ||
| ) |
Copies the current working directory into *dir (max size maxncpy), and returns a pointer to same.
Definition at line 81 of file storage.c.
References BLI_getenv(), BLI_strncpy_wchar_as_utf8(), BLI_strnlen(), and NULL.
Referenced by BLI_path_abs_from_cwd().
| int BLI_delete | ( | const char * | file, |
| bool | dir, | ||
| bool | recursive | ||
| ) |
Deletes the specified file or directory (depending on dir), optionally doing recursive delete of directory contents.
Definition at line 1037 of file fileops.c.
References BLI_assert, BLI_path_is_rel(), delete_callback_post(), delete_single_file(), file, NULL, and recursive_operation().
Referenced by BKE_packedfile_compare_to_file(), BKE_ptcache_id_clear(), BKE_ptcache_remove(), BKE_tempdir_session_purge(), BLI_rename(), cdf_remove(), blender::io::alembic::AlembicExportTest::deleteArchive(), blender::io::alembic::export_endjob(), blender::io::usd::export_endjob(), DocumentExporter::exportCurrentScene(), IMB_thumb_delete(), IMB_thumb_manage(), RE_RenderAnim(), seq_disk_cache_delete_file(), seq_disk_cache_handle_versioning(), and wm_autosave_delete().
| 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.
Definition at line 1056 of file fileops.c.
References BLI_assert, BLI_path_is_rel(), delete_soft(), and file.
Referenced by file_delete_single().
| bool BLI_dir_create_recursive | ( | const char * | dirname | ) |
Definition at line 1329 of file fileops.c.
References BLI_dir_create_recursive(), BLI_exists(), BLI_is_dir(), BLI_path_slash_rfind(), BLI_path_slash_rstrip(), BLI_strncpy(), dirname(), MAXPATHLEN, MEM_callocN, MEM_freeN, ret, and size().
Referenced by BKE_appdir_folder_id_create(), BLI_dir_create_recursive(), BLI_make_existing_file(), MANTA::exportLiquidScript(), MANTA::exportSmokeScript(), file_directory_new_exec(), fluid_bake_startjob(), fluid_validatepaths(), IMB_thumb_makedirs(), tempdir_session_create(), and MANTA::writeConfiguration().
| double BLI_dir_free_space | ( | const char * | dir | ) |
Returns the number of free bytes on the volume containing the specified pathname.
Definition at line 109 of file storage.c.
References ELEM, FILE_MAXDIR, and len.
| 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 349 of file storage.c.
References alloc_utf16_from_8(), BLI_assert, BLI_path_is_rel(), ELEM, free(), L, and len.
Referenced by BKE_appdir_app_template_has_userpref(), BKE_appdir_program_python_search(), BKE_cachefile_filepath_get(), BKE_packedfile_compare_to_file(), BKE_packedfile_unpack_to_file(), BKE_ptcache_id_exist(), BKE_ptcache_remove(), BKE_text_file_modified_check(), BKE_text_file_modified_ignore(), BKE_volume_load(), blf_dir_metrics_search(), blf_dir_search(), BLI_dir_create_recursive(), BLI_is_dir(), BLI_is_file(), BLI_path_program_search(), BLI_rename(), checkMissingFiles_visit_cb(), blender::io::alembic::AlembicExportTest::deleteArchive(), do_history(), blender::io::alembic::export_endjob(), blender::io::usd::export_endjob(), file_delete_single(), file_directory_new_exec(), file_exec(), 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(), missing_files_find__visit_cb(), movieclip_calc_length(), namebutton_fn(), new_folder_path(), openanim(), RE_RenderAnim(), renamebutton_cb(), 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(), txt_write_file(), where_am_i(), wm_autosave_delete(), wm_autosave_location(), wm_block_create_splash(), wm_file_write(), wm_homefile_read(), WM_lib_reload(), wm_lib_relocate_exec_do(), workspace_config_file_read(), workspace_system_file_read(), and DocumentImporter::writeImage().
| bool BLI_file_alias_target | ( | const char * | filepath, |
| char * | r_targetpath | ||
| ) |
Referenced by filelist_readjob_list_dir().
| eFileAttributes BLI_file_attributes | ( | const char * | path | ) |
Definition at line 230 of file storage.c.
References ARRAY_SIZE, BLI_path_extension_check(), conv_utf_8_to_16(), error(), FILE_ATTR_ALIAS, FILE_ATTR_ARCHIVE, FILE_ATTR_COMPRESSED, FILE_ATTR_ENCRYPTED, FILE_ATTR_HIDDEN, FILE_ATTR_OFFLINE, FILE_ATTR_READONLY, FILE_ATTR_REPARSE_POINT, FILE_ATTR_SPARSE_FILE, FILE_ATTR_SYSTEM, FILE_ATTR_TEMPORARY, FILE_MAXDIR, ret, and UNUSED_VARS.
Referenced by filelist_readjob_list_dir(), and seq_disk_cache_get_files().
| size_t BLI_file_descriptor_size | ( | int | file | ) |
Returns the file size of an opened file descriptor.
Definition at line 207 of file storage.c.
References BLI_fstat(), and file.
Referenced by BKE_packedfile_new(), build_pict_list_ex(), IMB_loadifffile(), imb_loadtilefile(), prefetch_read_file_to_memory(), and proxy_thread_next_frame().
| void BLI_file_free_lines | ( | struct LinkNode * | lines | ) |
Definition at line 639 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().
| bool BLI_file_is_writable | ( | const char * | filename | ) |
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 265 of file fileops.c.
References BLI_access(), BLI_split_dirfile(), FILE_MAX, and NULL.
Referenced by image_save_exec(), RE_is_rendering_allowed(), sequencer_export_subtitles_exec(), txt_write_file(), and wm_file_write().
| bool BLI_file_older | ( | const char * | file1, |
| const char * | file2 | ||
| ) |
is file1 older than file2
Definition at line 645 of file storage.c.
References UTF16_ENCODE, and UTF16_UN_ENCODE.
Referenced by imb_cache_filename(), and IMB_thumb_manage().
| struct LinkNode* BLI_file_read_as_lines | ( | const char * | filepath | ) |
Reads the contents of a text file and returns the lines in a linked list.
Definition at line 590 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().
| void* BLI_file_read_binary_as_mem | ( | const char * | filepath, |
| size_t | pad_bytes, | ||
| size_t * | r_size | ||
| ) |
Definition at line 519 of file storage.c.
References BLI_fopen(), file_read_data_as_mem_impl(), and NULL.
Referenced by BKE_icon_geom_from_file().
| void* BLI_file_read_text_as_mem | ( | const char * | filepath, |
| size_t | pad_bytes, | ||
| size_t * | r_size | ||
| ) |
Definition at line 508 of file storage.c.
References BLI_fopen(), file_read_data_as_mem_impl(), and NULL.
Referenced by BKE_text_load_ex(), BKE_text_reload(), BLI_file_read_text_as_mem_with_newline_as_nil(), and paste_from_file().
| 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:
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.
| trim_trailing_space | Replace trailing spaces & tabs with nil. This arguments prevents the caller from counting blank lines (if that's important). |
| pad_bytes | When 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:
Definition at line 557 of file storage.c.
References BLI_file_read_text_as_mem(), ELEM, and NULL.
| size_t BLI_file_size | ( | const char * | path | ) |
Returns the size of a file.
Definition at line 219 of file storage.c.
References BLI_stat().
Referenced by IMB_exr_begin_read(), RE_RenderAnim(), and thumb_create_ex().
| 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 294 of file fileops.c.
References BLI_fopen(), Freestyle::c, file, and NULL.
Referenced by RE_RenderAnim(), seq_disk_cache_read_file(), and sequencer_export_subtitles_exec().
| char* BLI_file_ungzip_to_mem | ( | const char * | from_file, |
| int * | r_size | ||
| ) |
Definition at line 117 of file fileops.c.
References BLI_gzopen(), MEM_callocN, MEM_freeN, MEM_reallocN, NULL, and size().
| unsigned int BLI_filelist_dir_contents | ( | const char * | dirname, |
| struct direntry ** | r_filelist | ||
| ) |
Scans the contents of the directory named *dirname, and allocates and fills in an array of entries describing them in *filelist.
Definition at line 238 of file BLI_filelist.c.
References bli_builddir(), dirname(), BuildDirCtx::files, MEM_mallocN, BuildDirCtx::nrfiles, and NULL.
Referenced by BKE_appdir_app_templates(), filelist_readjob_list_dir(), fsmenu_read_system(), image_get_udim(), init_iconfile_list(), seq_disk_cache_get_files(), and studiolight_add_files_from_datafolder().
| void BLI_filelist_duplicate | ( | struct direntry ** | dest_filelist, |
| struct direntry *const | src_filelist, | ||
| const unsigned int | nrentries | ||
| ) |
Deep-duplicate of an array of direntries, including the array itself.
Definition at line 437 of file BLI_filelist.c.
References BLI_filelist_entry_duplicate(), and MEM_mallocN.
| void BLI_filelist_entry_datetime_to_string | ( | const struct stat * | st, |
| const int64_t | ts, | ||
| const bool | compact, | ||
| char | r_time[], | ||
| char | r_date[], | ||
| bool * | r_is_today, | ||
| bool * | r_is_yesterday | ||
| ) |
Referenced by filelist_get_details_column_string(), and wm_open_mainfile_description().
Deep-duplicate of a single direntry.
Definition at line 423 of file BLI_filelist.c.
References MEM_dupallocN, direntry::path, and direntry::relname.
Referenced by BLI_filelist_duplicate().
| void BLI_filelist_entry_free | ( | struct direntry * | entry | ) |
frees storage for a single direntry, not the direntry itself.
Definition at line 454 of file BLI_filelist.c.
References MEM_freeN, direntry::path, and direntry::relname.
Referenced by BLI_filelist_free().
| void BLI_filelist_entry_mode_to_string | ( | const struct stat * | st, |
| const bool | compact, | ||
| char | r_mode1[], | ||
| char | r_mode2[], | ||
| char | r_mode3[] | ||
| ) |
| void BLI_filelist_entry_owner_to_string | ( | const struct stat * | st, |
| const bool | compact, | ||
| char | r_owner[] | ||
| ) |
| void BLI_filelist_entry_size_to_string | ( | const struct stat * | st, |
| const uint64_t | sz, | ||
| const bool | compact, | ||
| char | r_size[] | ||
| ) |
Referenced by filelist_get_details_column_string(), and wm_open_mainfile_description().
| void BLI_filelist_free | ( | struct direntry * | filelist, |
| const unsigned int | nrentries | ||
| ) |
frees storage for an array of direntries, including the array itself.
Definition at line 467 of file BLI_filelist.c.
References BLI_filelist_entry_free(), MEM_freeN, and NULL.
Referenced by BKE_appdir_app_templates(), filelist_readjob_list_dir(), fsmenu_read_system(), image_get_udim(), init_iconfile_list(), seq_disk_cache_get_files(), and studiolight_add_files_from_datafolder().
| FILE* BLI_fopen | ( | const char * | filename, |
| const char * | mode | ||
| ) |
Definition at line 1003 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(), 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(), IMB_index_builder_create(), IMB_indexer_open(), imb_savebmp(), imb_savehdr(), imb_savepng(), imb_savetarga(), logImageOpenFromFile(), make(), MOD_meshcache_read_mdd_times(), MOD_meshcache_read_pc2_times(), 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().
| int BLI_fseek | ( | FILE * | stream, |
| int64_t | offset, | ||
| int | whence | ||
| ) |
Definition at line 186 of file storage.c.
Referenced by AVI_close_compress(), AVI_is_avi(), AVI_open_compress(), AVI_open_movie(), AVI_read_frame(), AVI_set_compress_option(), AVI_write_frame(), BLI_file_read_as_lines(), file_read_data_as_mem_impl(), MOD_meshcache_read_mdd_frame(), MOD_meshcache_read_mdd_index(), MOD_meshcache_read_pc2_frame(), MOD_meshcache_read_pc2_index(), and ptcache_file_header_begin_read().
| int BLI_fstat | ( | int | fd, |
| BLI_stat_t * | buffer | ||
| ) |
| int64_t BLI_ftell | ( | FILE * | stream | ) |
Definition at line 177 of file storage.c.
Referenced by AVI_close_compress(), AVI_is_avi(), AVI_open_compress(), AVI_open_movie(), AVI_write_frame(), BLI_file_read_as_lines(), and file_read_data_as_mem_impl().
| size_t BLI_gzip_mem_to_file_at_pos | ( | void * | buf, |
| size_t | len, | ||
| FILE * | file, | ||
| size_t | gz_stream_offset, | ||
| int | compression_level | ||
| ) |
| void* BLI_gzopen | ( | const char * | filename, |
| const char * | mode | ||
| ) |
Definition at line 1010 of file fileops.c.
References BLI_assert, and BLI_path_is_rel().
Referenced by BLI_file_ungzip_to_mem(), blo_filedata_from_file_descriptor(), MANTA::readConfiguration(), wm_read_exotic(), MANTA::writeConfiguration(), and ww_open_zlib().
| bool BLI_is_dir | ( | const char * | file | ) |
Does the specified path point to a directory?
Definition at line 436 of file storage.c.
References BLI_exists(), file, and S_ISDIR.
Referenced by BKE_appdir_folder_documents(), BKE_tempdir_session_purge(), BLI_dir_create_recursive(), BLO_library_path_explode(), bookmark_cleanup_exec(), file_browse_exec(), file_sfile_filepath_set(), filelist_checkdir_dir(), filelist_checkdir_lib(), filelist_readjob_list_dir(), fsmenu_entry_refresh_valid(), seq_disk_cache_get_files(), seq_disk_cache_handle_versioning(), tempdir_session_create(), test_env_path(), test_path(), and where_is_temp().
| bool BLI_is_file | ( | const char * | path | ) |
Does the specified path point to a non-directory?
Definition at line 444 of file storage.c.
References BLI_exists(), and S_ISDIR.
Referenced by BLO_library_path_explode(), file_directory_enter_handle(), file_draw_check_exists(), filelist_checkdir_lib(), and lib_id_load_custom_preview_exec().
Definition at line 195 of file storage.c.
Referenced by BLI_mmap_open(), blo_filedata_from_file_descriptor(), and fd_seek_data_from_file().
| int BLI_open | ( | const char * | filename, |
| int | oflag, | ||
| int | pmode | ||
| ) |
Definition at line 1017 of file fileops.c.
References BLI_assert, BLI_path_is_rel(), and oflag.
Referenced by BKE_image_load(), BKE_movieclip_file_add(), BKE_packedfile_compare_to_file(), BKE_packedfile_new(), blo_filedata_from_file_open(), BLO_memfile_write_file(), build_pict_list_ex(), image_update_views_format(), imb_ispic_read_header_from_filepath(), IMB_loadiffname(), imb_loadtile(), IMB_testiffname(), M_imbuf_load(), prefetch_read_file_to_memory(), proxy_thread_next_frame(), and ww_open_none().
| int BLI_rename | ( | const char * | from, |
| const char * | to | ||
| ) |
Definition at line 1381 of file fileops.c.
References BLI_delete(), BLI_exists(), and from.
Referenced by BKE_packedfile_compare_to_file(), BKE_ptcache_disk_cache_rename(), BLO_write_file(), do_history(), DocumentExporter::exportCurrentScene(), IMB_index_builder_finish(), renamebutton_cb(), thumb_create_ex(), and wm_autosave_delete().
| int BLI_stat | ( | const char * | path, |
| BLI_stat_t * | buffer | ||
| ) |
Referenced by autocomplete_directory(), BKE_text_file_modified_check(), BKE_text_file_modified_ignore(), BKE_text_load_ex(), BKE_text_reload(), bli_builddir(), imb_get_anim_type(), imb_ispic_read_header_from_filepath(), IMB_thumb_manage(), missing_files_find__recursive(), seq_disk_cache_update_file(), thumb_create_ex(), txt_write_file(), and wm_open_mainfile_description().