Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenlib/BLI_fileops.h
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| int BLI_fstat(int fd, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | int BLI_fstat(int fd, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | ||||
| int BLI_stat(const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | int BLI_stat(const char *path, BLI_stat_t *buffer) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | ||||
| #ifdef WIN32 | #ifdef WIN32 | ||||
| int BLI_wstat(const wchar_t *path, BLI_stat_t *buffer); | int BLI_wstat(const wchar_t *path, BLI_stat_t *buffer); | ||||
| #endif | #endif | ||||
| /* File Attributes */ | |||||
| enum { | |||||
| DIRENTRY_INVALID_PREVIEW = 1 << 0, /* The preview for this entry could not be generated. */ | |||||
campbellbarton: Mixing this with file attributes seems strange. | |||||
| DIRENTRY_HIDDEN = 1 << 1, /* Hidden or invisible. */ | |||||
| DIRENTRY_SYSTEM = 1 << 2, /* Used by the Operating System. */ | |||||
| DIRENTRY_READONLY = 1 << 3, /* Read-only or Immutable. */ | |||||
| DIRENTRY_ARCHIVE = 1 << 4, /* Marked as archived. */ | |||||
| DIRENTRY_COMPRESSED = 1 << 5, /* Compressed. */ | |||||
| DIRENTRY_ENCRYPTED = 1 << 6, /* Encrypted. */ | |||||
| DIRENTRY_RESTRICTED = 1 << 7, /* Protected by OS. */ | |||||
| DIRENTRY_TEMPORARY = 1 << 8, /* Used for temporary storage. */ | |||||
| DIRENTRY_SPARSE_FILE = 1 << 9, /* Sparse File. */ | |||||
| DIRENTRY_OFFLINE = 1 << 10, /* Data is not immediately available. */ | |||||
| DIRENTRY_ALIAS = 1 << 11, /* Mac Alias or Windows Lnk. File-based redirection. */ | |||||
| DIRENTRY_REPARSE_POINT = 1 << 12, /* File has associated reparse point. */ | |||||
| DIRENTRY_SYMLINK = 1 << 13, /* Reference to another file. */ | |||||
| DIRENTRY_JUNCTION_POINT = 1 << 14, /* Folder Symlink. */ | |||||
| DIRENTRY_MOUNT_POINT = 1 << 15, /* Volume mounted as a folder. */ | |||||
| DIRENTRY_HARDLINK = 1 << 16, /* Duplicated directory entry. */ | |||||
| }; | |||||
| #define DIRENTRY_ANY_LINK \ | |||||
| (DIRENTRY_ALIAS | DIRENTRY_REPARSE_POINT | DIRENTRY_SYMLINK | DIRENTRY_JUNCTION_POINT | \ | |||||
| DIRENTRY_MOUNT_POINT | DIRENTRY_HARDLINK) | |||||
| /* Directories */ | /* Directories */ | ||||
| struct direntry; | struct direntry; | ||||
| bool BLI_is_dir(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | bool BLI_is_dir(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | ||||
| bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | bool BLI_is_file(const char *path) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | ||||
| bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL(); | bool BLI_dir_create_recursive(const char *dir) ATTR_NONNULL(); | ||||
| double BLI_dir_free_space(const char *dir) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | double BLI_dir_free_space(const char *dir) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); | ||||
| char *BLI_current_working_dir(char *dir, const size_t maxlen) ATTR_WARN_UNUSED_RESULT | char *BLI_current_working_dir(char *dir, const size_t maxlen) ATTR_WARN_UNUSED_RESULT | ||||
| ATTR_NONNULL(); | ATTR_NONNULL(); | ||||
| int BLI_file_attributes(const char *root, char *relpath); | |||||
| /* Filelist */ | /* Filelist */ | ||||
| unsigned int BLI_filelist_dir_contents(const char *dir, struct direntry **r_filelist); | unsigned int BLI_filelist_dir_contents(const char *dir, struct direntry **r_filelist); | ||||
| void BLI_filelist_entry_duplicate(struct direntry *dst, const struct direntry *src); | void BLI_filelist_entry_duplicate(struct direntry *dst, const struct direntry *src); | ||||
| void BLI_filelist_duplicate(struct direntry **dest_filelist, | void BLI_filelist_duplicate(struct direntry **dest_filelist, | ||||
| struct direntry *const src_filelist, | struct direntry *const src_filelist, | ||||
| const unsigned int nrentries); | const unsigned int nrentries); | ||||
| ▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines | |||||
Mixing this with file attributes seems strange.