Blender V2.61 - r43446
|
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <time.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#include <pwd.h>
#include "MEM_guardedalloc.h"
#include "DNA_listBase.h"
#include "BLI_fileops.h"
#include "BLI_listbase.h"
#include "BLI_linklist.h"
#include "BLI_string.h"
#include "BKE_utildefines.h"
Go to the source code of this file.
Functions | |
char * | BLI_current_working_dir (char *dir, const int maxncpy) |
static int | bli_compare (struct direntry *entry1, struct direntry *entry2) |
double | BLI_dir_free_space (const char *dir) |
static void | bli_builddir (const char *dirname, const char *relname) |
static void | bli_adddirstrings (void) |
unsigned int | BLI_dir_contents (const char *dirname, struct direntry **filelist) |
size_t | BLI_file_descriptor_size (int file) |
size_t | BLI_file_size (const char *path) |
int | BLI_exists (const char *name) |
int | BLI_is_dir (const char *file) |
int | BLI_is_file (const char *path) |
LinkNode * | BLI_file_read_as_lines (const char *name) |
void | BLI_file_free_lines (LinkNode *lines) |
int | BLI_file_older (const char *file1, const char *file2) |
Variables | |
static int | totnum |
static int | actnum |
static struct direntry * | files |
static struct ListBase | dirbase_ = {NULL, NULL} |
static struct ListBase * | dirbase = &dirbase_ |
Definition in file storage.c.
static void bli_adddirstrings | ( | void | ) | [static] |
Definition at line 284 of file storage.c.
References actnum, BLI_snprintf(), BLI_strdup(), BLI_strncpy(), direntry::date, direntry::mode1, direntry::mode2, direntry::mode3, NULL, direntry::owner, direntry::relname, direntry::s, direntry::size, size(), direntry::string, direntry::time, and types.
Referenced by BLI_dir_contents().
static void bli_builddir | ( | const char * | dirname, |
const char * | relname | ||
) | [static] |
Definition at line 198 of file storage.c.
References actnum, BLI_addhead(), bli_compare(), BLI_freelist(), BLI_strdup(), BLI_strdupcat(), BLI_strncpy(), ListBase::first, direntry::flags, addon::engine::free(), dirlink::name, dirlink::next, NULL, direntry::path, direntry::relname, direntry::s, strlen(), totnum, and direntry::type.
Referenced by BLI_dir_contents().
Definition at line 116 of file storage.c.
References BLI_natstrcmp(), direntry::relname, and direntry::type.
Referenced by bli_builddir().
char* BLI_current_working_dir | ( | char * | dir, |
const int | maxncpy | ||
) |
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().
unsigned int BLI_dir_contents | ( | const char * | dirname, |
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().
double BLI_dir_free_space | ( | const char * | dir | ) |
int BLI_exists | ( | const char * | name | ) |
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 | ( | 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_older | ( | const char * | file1, |
const char * | file2 | ||
) |
Definition at line 531 of file storage.c.
Referenced by imb_cache_filename().
LinkNode* BLI_file_read_as_lines | ( | const char * | name | ) | [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 * | path | ) |
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_is_dir | ( | const char * | file | ) |
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 actnum |
Definition at line 97 of file storage.c.
Referenced by bli_adddirstrings(), bli_builddir(), and BLI_dir_contents().
Definition at line 98 of file storage.c.
Referenced by file_draw_list(), and filelist_from_main().
int totnum [static] |
Definition at line 97 of file storage.c.
Referenced by bli_builddir(), and BLI_dir_contents().