Flutter Engine
The Flutter Engine
namespace_macos.cc
Go to the documentation of this file.
1// Copyright (c) 2017, 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
5#include "platform/globals.h"
6#if defined(DART_HOST_OS_MACOS)
7
8#include "bin/namespace.h"
9
10#include <errno.h>
11#include <fcntl.h>
12
13#include "bin/fdutils.h"
15
16namespace dart {
17namespace bin {
18
19Namespace* Namespace::Create(intptr_t namespc) {
20 return new Namespace(nullptr);
21}
22
23Namespace* Namespace::Create(const char* path) {
25 return nullptr;
26}
27
28Namespace::~Namespace() {
29 ASSERT(namespc_ == nullptr);
30}
31
32intptr_t Namespace::Default() {
33 return kNone;
34}
35
36const char* Namespace::GetCurrent(Namespace* namespc) {
37 char buffer[PATH_MAX];
38 if (getcwd(buffer, PATH_MAX) == nullptr) {
39 return nullptr;
40 }
42}
43
44bool Namespace::SetCurrent(Namespace* namespc, const char* path) {
45 int result = NO_RETRY_EXPECTED(chdir(path));
46 return (result == 0);
47}
48
49void Namespace::ResolvePath(Namespace* namespc,
50 const char* path,
51 intptr_t* dirfd,
52 const char** resolved_path) {
54}
55
56NamespaceScope::NamespaceScope(Namespace* namespc, const char* path) {
58}
59
62}
63
64} // namespace bin
65} // namespace dart
66
67#endif // defined(DART_HOST_OS_MACOS)
static char * ScopedCopyCString(const char *str)
Definition: dartutils.h:232
NamespaceScope(Namespace *namespc, const char *path)
static Namespace * Create(intptr_t namespc)
static const char * GetCurrent(Namespace *namespc)
static intptr_t Default()
static bool SetCurrent(Namespace *namespc, const char *path)
#define UNIMPLEMENTED
#define ASSERT(E)
GAsyncResult * result
Definition: dart_vm.cc:33
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
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
Definition: switches.h:126
#define PATH_MAX
Definition: globals.h:708
#define NO_RETRY_EXPECTED(expression)