6#if defined(DART_HOST_OS_WINDOWS)
41 CreateFileW(
name.get(), FILE_LIST_DIRECTORY,
42 FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
43 nullptr, OPEN_EXISTING,
44 FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED,
nullptr);
52 list_events |= FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME;
55 list_events |= FILE_NOTIFY_CHANGE_LAST_WRITE;
58 DirectoryWatchHandle* handle =
59 new DirectoryWatchHandle(
dir, list_events, recursive);
64 return reinterpret_cast<intptr_t
>(handle);
69 DirectoryWatchHandle* handle =
70 reinterpret_cast<DirectoryWatchHandle*
>(path_id);
81 const intptr_t kEventSize =
sizeof(FILE_NOTIFY_INFORMATION);
82 DirectoryWatchHandle*
dir =
reinterpret_cast<DirectoryWatchHandle*
>(path_id);
83 intptr_t available =
dir->Available();
87 intptr_t max_count = available / kEventSize + 1;
90 intptr_t bytes =
dir->Read(
buffer, available);
94 FILE_NOTIFY_INFORMATION*
e =
95 reinterpret_cast<FILE_NOTIFY_INFORMATION*
>(
buffer +
offset);
99 if (
e->Action == FILE_ACTION_ADDED) {
102 if (
e->Action == FILE_ACTION_REMOVED) {
105 if (
e->Action == FILE_ACTION_MODIFIED) {
108 if (
e->Action == FILE_ACTION_RENAMED_OLD_NAME) {
111 if (
e->Action == FILE_ACTION_RENAMED_NEW_NAME) {
120 e->FileNameLength / 2));
125 if (
e->NextEntryOffset == 0) {
static EventHandlerImplementation * delegate()
static intptr_t GetSocketId(intptr_t id, intptr_t path_id)
static void Close(intptr_t id)
static void UnwatchPath(intptr_t id, intptr_t path_id)
static bool IsSupported()
static Dart_Handle ReadEvents(intptr_t id, intptr_t path_id)
static intptr_t WatchPath(intptr_t id, Namespace *namespc, const char *path, int events, bool recursive)
struct _Dart_Handle * Dart_Handle
std::unique_ptr< wchar_t[]> Utf8ToWideChar(const char *path)
DART_EXPORT Dart_Handle Dart_NewStringFromUTF16(const uint16_t *utf16_array, intptr_t length)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
DART_EXPORT uint8_t * Dart_ScopeAllocate(intptr_t size)
DART_EXPORT Dart_Handle Dart_ListSetAt(Dart_Handle list, intptr_t index, Dart_Handle value)
DART_EXPORT Dart_Handle Dart_NewBoolean(bool value)
DART_EXPORT Dart_Handle Dart_NewList(intptr_t length)
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
#define INVALID_HANDLE_VALUE