Blender V2.61 - r43446
Functions | Variables

storage.c File Reference

#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)
LinkNodeBLI_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 direntryfiles
static struct ListBase dirbase_ = {NULL, NULL}
static struct ListBasedirbase = &dirbase_

Detailed Description

Definition in file storage.c.


Function Documentation

static void bli_adddirstrings ( void  ) [static]
static void bli_builddir ( const char *  dirname,
const char *  relname 
) [static]
static int bli_compare ( struct direntry entry1,
struct direntry entry2 
) [static]

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 
)
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)

Definition at line 143 of file storage.c.

References DWORD, FILE_MAXDIR, len(), and strlen().

int BLI_exists ( const char *  name)
size_t BLI_file_descriptor_size ( int  file)
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]
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)
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().


Variable Documentation

int actnum

Definition at line 97 of file storage.c.

Referenced by bli_adddirstrings(), bli_builddir(), and BLI_dir_contents().

struct ListBase* dirbase = &dirbase_ [static]

Definition at line 101 of file storage.c.

struct ListBase dirbase_ = {NULL, NULL} [static]

Definition at line 100 of file storage.c.

struct direntry* files [static]

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().