Blender  V2.59
Functions
BLI_storage.h File Reference

A general unordered 2-int pair hash table ADT. More...

Go to the source code of this file.

Functions

void BLI_adddirstrings (void)
void BLI_builddir (const char *dirname, const char *relname)
int BLI_compare (struct direntry *entry1, struct direntry *entry2)
size_t BLI_filesize (int file)
size_t BLI_filepathsize (const char *path)
double BLI_diskfree (const char *dir)
char * BLI_getwdN (char *dir, const int maxncpy)
unsigned int BLI_getdir (const char *dirname, struct direntry **filelist)
int BLI_exist (const char *name)
int BLI_is_dir (const char *file)
struct LinkNodeBLI_read_file_as_lines (const char *name)
void BLI_free_file_lines (struct LinkNode *lines)
int BLI_file_older (const char *file1, const char *file2)

Detailed Description

A general unordered 2-int pair hash table ADT.

Filling meshes.

Simple fast memory allocator.

Author:
Daniel Dunbar
Geoffrey Bantle
Since:
March 2001
Author:
nzc

Definition in file BLI_storage.h.


Function Documentation

void BLI_adddirstrings ( void  )
void BLI_builddir ( const char *  dirname,
const char *  relname 
)
int BLI_compare ( struct direntry entry1,
struct direntry entry2 
)

Definition at line 119 of file storage.c.

References BLI_natstrcmp(), direntry::relname, and direntry::type.

Referenced by BLI_builddir().

double BLI_diskfree ( const char *  dir)

Definition at line 146 of file storage.c.

References DWORD, and FILE_MAXDIR.

int BLI_exist ( const char *  name)
int BLI_file_older ( const char *  file1,
const char *  file2 
)

Definition at line 522 of file storage.c.

Referenced by imb_cache_filename().

size_t BLI_filepathsize ( const char *  path)

Definition at line 428 of file storage.c.

References BLI_filesize(), O_BINARY, and size().

Referenced by IMB_exr_begin_read(), IMB_thumb_create(), and RE_BlenderAnim().

size_t BLI_filesize ( int  file)
void BLI_free_file_lines ( struct LinkNode lines)

Free the list returned by BLI_read_file_as_lines.

Definition at line 517 of file storage.c.

References BLI_linklist_free(), and MEM_freeN().

Referenced by WM_read_history().

unsigned int BLI_getdir ( const char *  dirname,
struct direntry **  filelist 
)

Definition at line 395 of file storage.c.

References actnum, BLI_adddirstrings(), BLI_builddir(), NULL, and totnum.

Referenced by filelist_read_dir(), and init_iconfile_list().

char* BLI_getwdN ( char *  dir,
const int  maxncpy 
)
int BLI_is_dir ( const char *  file)

Read a file as ASCII lines. An empty list is returned if the file cannot be opened or read.

Attention:
The returned list should be free'd with BLI_free_file_lines.
Parameters:
nameThe name of the file to read.
Return values:
Alist of strings representing the file lines.

Definition at line 472 of file storage.c.

References BLI_exist().

Referenced by BLI_getDefaultDocumentFolder(), BLI_make_exist(), BLI_where_is_temp(), file_browse_exec(), file_change_dir(), file_directory_exec(), file_draw_check_exists(), test_env_path(), and test_path().

struct LinkNode* BLI_read_file_as_lines ( const char *  name) [read]