|
Blender V4.5
|
import <Foundation/Foundation.h>#include <string>#include <sys/xattr.h>#include "BLI_fileops.h"#include "BLI_path_utils.hh"#include "BLI_string.h"Go to the source code of this file.
Functions | |
| bool | BLI_file_alias_target (const char *filepath, char r_targetpath[FILE_MAXDIR]) |
| static bool | find_attribute (const std::string &attributes, const char *search_attribute) |
| static bool | test_onedrive_file_is_placeholder (const char *path) |
| static bool | test_file_is_offline (const char *path) |
| eFileAttributes | BLI_file_attributes (const char *path) |
| char * | BLI_current_working_dir (char *dir, const size_t maxncpy) |
| bool | BLI_change_working_dir (const char *dir) |
Variables | |
| static const char * | ONEDRIVE_RECALLONOPEN_ATTRIBUTE = "com.microsoft.OneDrive.RecallOnOpen" |
macOS specific implementations for storage.c.
Definition in file storage_apple.mm.
| bool BLI_change_working_dir | ( | const char * | dir | ) |
Changes the current working directory to the provided path.
Usage of this function is strongly discouraged as it is not thread safe. It will likely cause issues if there is an operation on another thread that does not expect the current working directory to change. This has been added to support USDZ export, which has a problematic "feature" described in this issue #99807. It will be removed if it is possible to resolve that issue upstream in the USD library.
Definition at line 189 of file storage_apple.mm.
References ARRAY_SIZE, BLI_assert, BLI_change_working_dir(), BLI_is_dir(), BLI_setenv(), BLI_thread_is_main(), conv_utf_8_to_16(), FILE_MAX, and result.
Referenced by BLI_change_working_dir(), blender::io::usd::perform_usdz_conversion(), and blender::tests::TEST_F().
| char * BLI_current_working_dir | ( | char * | dir, |
| size_t | maxncpy ) |
Copies the current working directory into *dir (max size maxncpy), and returns a pointer to same.
Definition at line 176 of file storage_apple.mm.
References BLI_current_working_dir(), BLI_getenv(), BLI_strncpy(), BLI_strncpy_wchar_as_utf8(), BLI_strnlen(), length(), and PATH_MAX.
Referenced by BLI_current_working_dir(), BLI_current_working_dir(), BLI_path_abs_from_cwd(), blender::io::usd::perform_usdz_conversion(), blender::io::usd::TEST_F(), and blender::tests::TEST_F().
| bool BLI_file_alias_target | ( | const char * | filepath, |
| char | r_targetpath[FILE_MAXDIR] ) |
Definition at line 22 of file storage_apple.mm.
References BLI_file_alias_target(), FILE_MAXDIR, and options.
| eFileAttributes BLI_file_attributes | ( | const char * | path | ) |
Definition at line 123 of file storage_apple.mm.
References ARRAY_SIZE, BLI_assert_msg, BLI_file_attributes(), BLI_path_extension_check(), conv_utf_8_to_16(), FILE_ATTR_ALIAS, FILE_ATTR_ARCHIVE, FILE_ATTR_COMPRESSED, FILE_ATTR_ENCRYPTED, FILE_ATTR_HIDDEN, FILE_ATTR_OFFLINE, FILE_ATTR_READONLY, FILE_ATTR_REPARSE_POINT, FILE_ATTR_SPARSE_FILE, FILE_ATTR_SYSTEM, FILE_ATTR_TEMPORARY, FILE_MAXDIR, ret, test_file_is_offline(), and UNUSED_VARS.
Referenced by BLI_file_attributes(), filelist_readjob_list_dir(), IMB_thumb_manage(), and uiTemplateRecentFiles_tooltip_func().
|
static |
Checks if the given string of listxattr() attributes contains a specific attribute.
| attributes | a string of null-terminated listxattr() attributes. |
| search_attribute | the attribute to search for. |
Definition at line 69 of file storage_apple.mm.
References find_attribute(), and STREQ.
|
static |
Checks if the file is marked as offline and not immediately available.
| path | the path of the file. |
Definition at line 117 of file storage_apple.mm.
References test_file_is_offline(), and test_onedrive_file_is_placeholder().
Referenced by BLI_file_attributes(), and test_file_is_offline().
|
static |
Checks if the file is merely a placeholder for a OneDrive file that hasn't yet been downloaded.
| path | the path of the file. |
Definition at line 88 of file storage_apple.mm.
References find_attribute(), ONEDRIVE_RECALLONOPEN_ATTRIBUTE, size(), and test_onedrive_file_is_placeholder().
Referenced by test_file_is_offline(), and test_onedrive_file_is_placeholder().
|
static |
Definition at line 20 of file storage_apple.mm.
Referenced by test_onedrive_file_is_placeholder().