Blender V2.61 - r43446
|
File and directory operations. More...
Go to the source code of this file.
Functions | |
int | BLI_exists (const char *path) |
int | BLI_copy (const char *path, const char *to) |
int | BLI_rename (const char *from, const char *to) |
int | BLI_delete (const char *path, int dir, int recursive) |
int | BLI_move (const char *path, const char *to) |
int | BLI_create_symlink (const char *path, const char *to) |
int | BLI_is_dir (const char *path) |
int | BLI_is_file (const char *path) |
void | BLI_dir_create_recursive (const char *dir) |
double | BLI_dir_free_space (const char *dir) |
char * | BLI_current_working_dir (char *dir, const int maxlen) |
unsigned int | BLI_dir_contents (const char *dir, struct direntry **filelist) |
int | BLI_file_is_writable (const char *file) |
int | BLI_file_touch (const char *file) |
int | BLI_file_gzip (const char *from, const char *to) |
char * | BLI_file_ungzip_to_mem (const char *from_file, int *size_r) |
size_t | BLI_file_descriptor_size (int file) |
size_t | BLI_file_size (const char *file) |
int | BLI_file_older (const char *file1, const char *file2) |
struct LinkNode * | BLI_file_read_as_lines (const char *file) |
void | BLI_file_free_lines (struct LinkNode *lines) |
File and directory operations.
Definition in file BLI_fileops.h.
int BLI_copy | ( | const char * | path, |
const char * | to | ||
) |
Definition at line 358 of file fileops.c.
References BLI_snprintf(), and str.
Referenced by ImagesExporter::operator()(), and writePackedFile().
int BLI_create_symlink | ( | const char * | path, |
const char * | to | ||
) |
Definition at line 365 of file fileops.c.
References BLI_snprintf(), and str.
char* BLI_current_working_dir | ( | char * | dir, |
const int | maxlen | ||
) |
Definition at line 104 of file storage.c.
References BLI_strncpy().
Referenced by BLI_path_cwd(), bli_where_am_i(), filelist_read_dir(), get_path_system(), and init_iconfile_list().
int BLI_delete | ( | const char * | path, |
int | dir, | ||
int | recursive | ||
) |
Definition at line 330 of file fileops.c.
References BLI_snprintf(), and str.
Referenced by BKE_ptcache_id_clear(), BKE_ptcache_remove(), BLI_file_is_writable(), BLI_rename(), BLO_write_file(), cdf_remove(), file_delete_exec(), IMB_thumb_delete(), RE_BlenderAnim(), wm_autosave_delete(), and writePackedFile().
unsigned int BLI_dir_contents | ( | const char * | dir, |
struct direntry ** | filelist | ||
) |
Definition at line 397 of file storage.c.
References actnum, bli_adddirstrings(), bli_builddir(), NULL, and totnum.
Referenced by filelist_read_dir(), and init_iconfile_list().
void BLI_dir_create_recursive | ( | const char * | dir | ) |
Definition at line 372 of file fileops.c.
References BLI_dir_create_recursive(), BLI_exists(), BLI_last_slash(), and BLI_strncpy().
Referenced by BLI_dir_create_recursive(), BLI_get_folder_create(), BLI_make_existing_file(), file_directory_exec(), file_directory_new_exec(), and IMB_thumb_makedirs().
double BLI_dir_free_space | ( | const char * | dir | ) |
int BLI_exists | ( | const char * | path | ) |
Definition at line 443 of file storage.c.
References BLI_strncpy(), FILE_MAX, len(), and strlen().
Referenced by add_win32_extension(), autocomplete_directory(), BKE_ptcache_id_exist(), BKE_ptcache_remove(), blf_dir_metrics_search(), blf_dir_search(), BLI_dir_create_recursive(), BLI_is_dir(), BLI_is_file(), BLI_make_existing_file(), BLI_rename(), bli_where_am_i(), cache_voxeldata(), checkMissingFiles_visit_cb(), collada_export(), file_directory_exec(), file_directory_invoke(), file_directory_new_exec(), file_exec(), fsmenu_read_bookmarks(), fsmenu_read_system(), get_filename(), image_save_exec(), IMB_exr_begin_read(), IMB_thumb_delete(), IMB_thumb_manage(), namebutton_cb(), new_folder_path(), openanim(), ptcache_file_open(), RE_BlenderAnim(), renamebutton_cb(), seq_proxy_fetch(), space_image_file_exists_poll(), text_file_modified(), text_ignore_modified(), unpackFile(), wm_autosave_delete(), wm_autosave_location(), WM_read_history(), WM_read_homefile(), wm_save_mainfile_invoke(), and writePackedFile().
size_t BLI_file_descriptor_size | ( | int | file | ) |
Definition at line 421 of file storage.c.
Referenced by BLI_file_size(), BLO_read_runtime(), IMB_loadifffile(), imb_loadtilefile(), and newPackedFile().
void BLI_file_free_lines | ( | struct LinkNode * | lines | ) |
Definition at line 526 of file storage.c.
References BLI_linklist_free(), and MEM_freeN().
Referenced by WM_read_history().
int BLI_file_gzip | ( | const char * | from, |
const char * | to | ||
) |
int BLI_file_is_writable | ( | const char * | file | ) |
Definition at line 152 of file fileops.c.
References BLI_delete(), and O_BINARY.
Referenced by image_save_exec(), RE_is_rendering_allowed(), and space_image_file_exists_poll().
int BLI_file_older | ( | const char * | file1, |
const char * | file2 | ||
) |
Definition at line 531 of file storage.c.
Referenced by imb_cache_filename().
struct LinkNode* BLI_file_read_as_lines | ( | const char * | file | ) | [read] |
Definition at line 485 of file storage.c.
References BLI_linklist_prepend(), BLI_linklist_reverse(), BLI_strdupn(), i, MEM_freeN(), MEM_mallocN(), NULL, and size().
Referenced by WM_read_history().
size_t BLI_file_size | ( | const char * | file | ) |
Definition at line 430 of file storage.c.
References BLI_file_descriptor_size(), O_BINARY, and size().
Referenced by IMB_exr_begin_read(), IMB_thumb_create(), and RE_BlenderAnim().
int BLI_file_touch | ( | const char * | file | ) |
Definition at line 180 of file fileops.c.
References NULL.
Referenced by collada_export(), RE_BlenderAnim(), and touch_seq_files().
char* BLI_file_ungzip_to_mem | ( | const char * | from_file, |
int * | size_r | ||
) |
Definition at line 111 of file fileops.c.
References MEM_callocN(), MEM_freeN(), MEM_reallocN(), NULL, and size().
int BLI_is_dir | ( | const char * | path | ) |
Definition at line 474 of file storage.c.
References BLI_exists().
Referenced by BLI_getDefaultDocumentFolder(), BLI_make_exist(), BLI_where_is_temp(), file_browse_exec(), file_change_dir(), test_env_path(), and test_path().
int BLI_is_file | ( | const char * | path | ) |
Definition at line 479 of file storage.c.
References BLI_exists().
Referenced by file_directory_exec(), and file_draw_check_exists().
int BLI_move | ( | const char * | path, |
const char * | to | ||
) |
Definition at line 351 of file fileops.c.
References BLI_snprintf(), and str.
int BLI_rename | ( | const char * | from, |
const char * | to | ||
) |
Definition at line 391 of file fileops.c.
References BLI_delete(), and BLI_exists().
Referenced by BKE_ptcache_disk_cache_rename(), BLO_write_file(), do_history(), IMB_thumb_create(), renamebutton_cb(), wm_autosave_delete(), and writePackedFile().