Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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)
static const uint8_t buffer[]
GAsyncResult * result
#define PATH_MAX
Definition globals.h:708
#define NO_RETRY_EXPECTED(expression)