Files
sdk/runtime/bin/file_system_watcher_fuchsia.cc
T
Zach Anderson 3ad0571cf9 [fuchsia] Fixes for the Fuchsia build
Makes public some include paths needed for the dart_runner to depend on
dart_io.

Also updates some dart:io implementations to give and OSError
instead of crashing when something is unimplemented.

Change-Id: I862fc7cc43f56e74de791ecc021b88238b54a8e5
Reviewed-on: https://dart-review.googlesource.com/c/84920
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2018-11-26 16:30:33 +00:00

52 lines
1.2 KiB
C++

// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
#if defined(HOST_OS_FUCHSIA)
#include "bin/file_system_watcher.h"
#include <errno.h>
namespace dart {
namespace bin {
Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
errno = ENOSYS;
return DartUtils::NewDartOSError();
}
intptr_t FileSystemWatcher::GetSocketId(intptr_t id, intptr_t path_id) {
errno = ENOSYS;
return -1;
}
bool FileSystemWatcher::IsSupported() {
return false;
}
void FileSystemWatcher::UnwatchPath(intptr_t id, intptr_t path_id) {
}
intptr_t FileSystemWatcher::Init() {
return 0;
}
void FileSystemWatcher::Close(intptr_t id) {
}
intptr_t FileSystemWatcher::WatchPath(intptr_t id,
Namespace* namespc,
const char* path,
int events,
bool recursive) {
errno = ENOSYS;
return -1;
}
} // namespace bin
} // namespace dart
#endif // defined(HOST_OS_FUCHSIA)