|
Blender
V2.59
|
00001 /* $Id: BLI_storage.h 34966 2011-02-18 13:58:08Z jesterking $ 00002 * 00003 * ***** BEGIN GPL LICENSE BLOCK ***** 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software Foundation, 00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00020 * All rights reserved. 00021 * 00022 * The Original Code is: all of this file. 00023 * 00024 * Contributor(s): none yet. 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 00029 #ifndef BLI_STORAGE_H 00030 #define BLI_STORAGE_H 00031 00036 #ifdef WIN32 00037 /* for size_t, only needed on win32 for some reason */ 00038 #include <stddef.h> 00039 #endif 00040 00041 struct direntry; 00042 00043 00044 void BLI_adddirstrings(void); 00045 void BLI_builddir(const char *dirname, const char *relname); 00046 int BLI_compare(struct direntry *entry1, struct direntry *entry2); 00047 00048 size_t BLI_filesize(int file); 00049 size_t BLI_filepathsize(const char *path); 00050 double BLI_diskfree(const char *dir); 00051 char *BLI_getwdN(char *dir, const int maxncpy); 00052 00053 unsigned int BLI_getdir(const char *dirname, struct direntry **filelist); 00057 int BLI_exist(const char *name); 00069 int BLI_is_dir(const char *file); 00070 00071 struct LinkNode *BLI_read_file_as_lines(const char *name); 00072 00076 void BLI_free_file_lines(struct LinkNode *lines); 00077 00078 /* Compare if one was last modified before the other */ 00079 int BLI_file_older(const char *file1, const char *file2); 00080 00081 #endif /* BLI_STORAGE_H */ 00082