22char* Directory::system_temp_path_override_ =
nullptr;
27 if (current !=
nullptr) {
47 const int kExists = 1;
48 const int kDoesNotExist = 0;
156 reinterpret_cast<intptr_t*
>(&listing)));
157 if (listing !=
nullptr) {
158 intptr_t listing_pointer =
reinterpret_cast<intptr_t
>(listing);
176 intptr_t listing_pointer =
188 if (system_temp_path_override_ !=
nullptr) {
189 free(system_temp_path_override_);
190 system_temp_path_override_ =
nullptr;
192 if (
path !=
nullptr) {
213 reinterpret_cast<const char*
>(
path.Buffer()))
231 reinterpret_cast<const char*
>(
path.Buffer()),
238 const int kExists = 1;
239 const int kDoesNotExist = 0;
271 namespc,
reinterpret_cast<const char*
>(
path.Buffer()));
302 namespc,
reinterpret_cast<const char*
>(
path.Buffer()), recursive.
Value(),
303 follow_links.
Value());
304 if (dir_listing->
error()) {
311 error->SetAt(1, request[1]);
312 error->SetAt(2, err);
373 reinterpret_cast<const char*
>(
path.Buffer()),
379bool AsyncDirectoryListing::AddFileSystemEntityToResponse(
Response type,
382 if (arg !=
nullptr) {
383 size_t len = strlen(arg);
386 memmove(
reinterpret_cast<char*
>(
data), arg,
len);
390 array_->
SetAt(index_++, external_array);
394 return index_ < length_;
402 return AddFileSystemEntityToResponse(
kListFile, file_name);
406 return AddFileSystemEntityToResponse(
kListLink, link_name);
410 AddFileSystemEntityToResponse(
kListDone,
nullptr);
422 response->
SetAt(2, err);
423 array_->
SetAt(index_++, response);
424 return index_ < length_;
434 size_t dir_name_length = strlen(dir_name);
435 uint8_t*
buffer =
nullptr;
441 memmove(
buffer, dir_name, dir_name_length);
442 Dart_Handle constructor_name = from_raw_path_string_;
444 Dart_New(directory_type_, constructor_name, 1, &dir_name_dart);
460 size_t link_name_length = strlen(link_name);
461 uint8_t*
buffer =
nullptr;
467 memmove(
buffer, link_name, link_name_length);
468 Dart_Handle constructor_name = from_raw_path_string_;
485 size_t file_name_length = strlen(file_name);
486 uint8_t*
buffer =
nullptr;
492 memmove(
buffer, file_name, file_name_length);
493 Dart_Handle constructor_name = from_raw_path_string_;
506 args[0] = dart_os_error;
517 switch (listing->
top()->
Next(listing)) {
549 if (listing->
error()) {
static const uint32_t kArraySize
#define FUNCTION_NAME(name)
static char * StrDup(const char *s)
void SetArray(CObjectArray *array, intptr_t length)
virtual void HandleDone()
virtual bool HandleDirectory(const char *dir_name)
virtual bool HandleLink(const char *file_name)
virtual bool HandleFile(const char *file_name)
virtual bool HandleError()
void SetAt(intptr_t index, CObject *value)
const char * CString() const
static Dart_CObject * NewString(const char *str)
static CObject * IllegalArgumentError()
static Dart_CObject * NewIntptr(intptr_t value)
static Dart_CObject * NewIOBuffer(int64_t length)
static CObject * Bool(bool value)
Dart_CObject * AsApiCObject()
static Dart_CObject * NewArray(intptr_t length)
static Dart_CObject * NewInt32(int32_t value)
static CObject * NewOSError()
static constexpr const char * kIOLibURL
static const char * GetNativeTypedDataArgument(Dart_NativeArguments args, intptr_t index)
static Dart_Handle NewDartOSError()
static Dart_Handle NewString(const char *str)
static Dart_Handle GetDartType(const char *library_url, const char *class_name)
static intptr_t GetIntptrValue(Dart_Handle value_obj)
static const char * GetNativeStringArgument(Dart_NativeArguments args, intptr_t index)
static bool GetNativeBooleanArgument(Dart_NativeArguments args, intptr_t index)
ListType Next(DirectoryListing *listing)
const char * CurrentPath()
DirectoryListingEntry * top() const
void Push(DirectoryListingEntry *directory)
virtual bool HandleFile(const char *file_name)=0
virtual void HandleDone()
virtual bool HandleDirectory(const char *dir_name)=0
virtual bool HandleLink(const char *link_name)=0
virtual bool HandleError()=0
static bool SetCurrent(Namespace *namespc, const char *path)
static bool Create(Namespace *namespc, const char *path)
static ExistsResult Exists(Namespace *namespc, const char *path)
static bool Rename(Namespace *namespc, const char *path, const char *new_path)
static bool Delete(Namespace *namespc, const char *path, bool recursive)
static void List(DirectoryListing *listing)
static CObject * DeleteRequest(const CObjectArray &request)
static CObject * CreateTempRequest(const CObjectArray &request)
static const char * CreateTemp(Namespace *namespc, const char *path)
static const char * Current(Namespace *namespc)
static CObject * ListStartRequest(const CObjectArray &request)
static CObject * RenameRequest(const CObjectArray &request)
static const char * SystemTemp(Namespace *namespc)
static CObject * CreateRequest(const CObjectArray &request)
static CObject * ListStopRequest(const CObjectArray &request)
static CObject * ExistsRequest(const CObjectArray &request)
static CObject * ListNextRequest(const CObjectArray &request)
static void SetSystemTemp(const char *path)
static Dart_Handle Allocate(intptr_t size, uint8_t **buffer)
static Namespace * GetNamespace(Dart_NativeArguments args, intptr_t index)
static const char * GetCurrent(Namespace *namespc)
static bool SetCurrent(Namespace *namespc, const char *path)
virtual bool HandleFile(const char *file_name)
virtual bool HandleLink(const char *file_name)
virtual bool HandleDirectory(const char *dir_name)
virtual bool HandleError()
struct _Dart_Handle * Dart_Handle
struct _Dart_NativeArguments * Dart_NativeArguments
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
const uint8_t uint32_t uint32_t GError ** error
void FUNCTION_NAME() Directory_CreateTemp(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_Delete(Dart_NativeArguments args)
static constexpr int kAsyncDirectoryListerFieldIndex
static Dart_Handle ThrowIfError(Dart_Handle handle)
void FUNCTION_NAME() Directory_SetCurrent(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_SetAsyncDirectoryListerPointer(Dart_NativeArguments args)
static void ReleaseListing(void *isolate_callback_data, void *peer)
void FUNCTION_NAME() Directory_Rename(Dart_NativeArguments args)
static bool ListNext(DirectoryListing *listing)
void FUNCTION_NAME() Directory_SystemTemp(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_FillWithDirectoryListing(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_Exists(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_GetAsyncDirectoryListerPointer(Dart_NativeArguments args)
static Namespace * CObjectToNamespacePointer(CObject *cobject)
static CObject * CreateIllegalArgumentError()
void FUNCTION_NAME() Directory_Current(Dart_NativeArguments args)
void FUNCTION_NAME() Directory_Create(Dart_NativeArguments args)
def link(from_root, to_root)
DART_EXPORT bool Dart_IsInstance(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_GetNativeInstanceField(Dart_Handle obj, int index, intptr_t *value)
DART_EXPORT Dart_Handle Dart_Invoke(Dart_Handle target, Dart_Handle name, int number_of_arguments, Dart_Handle *arguments)
DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, bool retval)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
DART_EXPORT void Dart_PropagateError(Dart_Handle handle)
DART_EXPORT Dart_FinalizableHandle Dart_NewFinalizableHandle(Dart_Handle object, void *peer, intptr_t external_allocation_size, Dart_HandleFinalizer callback)
DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, Dart_Handle retval)
DART_EXPORT bool Dart_IsError(Dart_Handle handle)
DART_EXPORT Dart_Handle Dart_SetNativeInstanceField(Dart_Handle obj, int index, intptr_t value)
DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args, int64_t retval)
DART_EXPORT Dart_Handle Dart_GetNativeArgument(Dart_NativeArguments args, int index)
DART_EXPORT Dart_Handle Dart_ThrowException(Dart_Handle exception)
DART_EXPORT bool Dart_IsNull(Dart_Handle object)
DART_EXPORT Dart_Handle Dart_New(Dart_Handle type, Dart_Handle constructor_name, int number_of_arguments, Dart_Handle *arguments)
static int8_t data[kExtLength]
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer
union _Dart_CObject::@86 value
struct _Dart_CObject::@86::@91 as_external_typed_data
struct _Dart_CObject::@86::@89 as_array