Flutter Engine
The Flutter Engine
file_system_watcher.cc
Go to the documentation of this file.
1// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2// for details. All rights reserved. Use of this source code is governed by a
3// BSD-style license that can be found in the LICENSE file.
4
6
7#include "bin/builtin.h"
8#include "bin/dartutils.h"
9#include "bin/file.h"
10#include "bin/utils.h"
11
12#include "include/dart_api.h"
13
14namespace dart {
15namespace bin {
16
17bool FileSystemWatcher::delayed_filewatch_callback_ = false;
18
21}
22
24 intptr_t id = FileSystemWatcher::Init();
25 if (id >= 0) {
27 } else {
29 }
30}
31
35}
36
43 intptr_t path_id =
44 FileSystemWatcher::WatchPath(id, namespc, path, events, recursive);
45 if (path_id == -1) {
47 }
49}
50
55}
56
60 Dart_Handle handle = FileSystemWatcher::ReadEvents(id, path_id);
61 ThrowIfError(handle);
63}
64
68 int socket_id = FileSystemWatcher::GetSocketId(id, path_id);
70}
71
72} // namespace bin
73} // namespace dart
#define FUNCTION_NAME(name)
Definition: builtin.h:19
static int64_t GetIntegerValue(Dart_Handle value_obj)
Definition: dartutils.cc:81
static Dart_Handle NewDartOSError()
Definition: dartutils.cc:702
static bool GetBooleanValue(Dart_Handle bool_obj)
Definition: dartutils.cc:137
static const char * GetStringValue(Dart_Handle str_obj)
Definition: dartutils.cc:128
static intptr_t GetIntptrValue(Dart_Handle value_obj)
Definition: dartutils.cc:100
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 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)
static Namespace * GetNamespace(Dart_NativeArguments args, intptr_t index)
Definition: namespace.cc:101
struct _Dart_Handle * Dart_Handle
Definition: dart_api.h:258
struct _Dart_NativeArguments * Dart_NativeArguments
Definition: dart_api.h:3019
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
static Dart_Handle ThrowIfError(Dart_Handle handle)
Definition: dartutils.h:31
void FUNCTION_NAME() FileSystemWatcher_CloseWatcher(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_InitWatcher(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_UnwatchPath(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_GetSocketId(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_IsSupported(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_ReadEvents(Dart_NativeArguments args)
void FUNCTION_NAME() FileSystemWatcher_WatchPath(Dart_NativeArguments args)
Definition: dart_vm.cc:33
DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args, bool retval)
DART_EXPORT Dart_Handle Dart_NewInteger(int64_t value)
DART_EXPORT void Dart_SetReturnValue(Dart_NativeArguments args, Dart_Handle retval)
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)
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
Definition: switches.h:57