Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
dart-lang
sdk
runtime
bin
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
"
14
#include "
platform/signal_blocker.h
"
15
16
namespace
dart
{
17
namespace
bin {
18
19
Namespace*
Namespace::Create
(intptr_t namespc) {
20
return
new
Namespace(
nullptr
);
21
}
22
23
Namespace*
Namespace::Create
(
const
char
* path) {
24
UNIMPLEMENTED
();
25
return
nullptr
;
26
}
27
28
Namespace::~Namespace() {
29
ASSERT
(namespc_ ==
nullptr
);
30
}
31
32
intptr_t
Namespace::Default
() {
33
return
kNone;
34
}
35
36
const
char
*
Namespace::GetCurrent
(Namespace* namespc) {
37
char
buffer
[
PATH_MAX
];
38
if
(getcwd(
buffer
,
PATH_MAX
) ==
nullptr
) {
39
return
nullptr
;
40
}
41
return
DartUtils::ScopedCopyCString
(
buffer
);
42
}
43
44
bool
Namespace::SetCurrent
(Namespace* namespc,
const
char
* path) {
45
int
result
=
NO_RETRY_EXPECTED
(chdir(path));
46
return
(
result
== 0);
47
}
48
49
void
Namespace::ResolvePath(Namespace* namespc,
50
const
char
* path,
51
intptr_t* dirfd,
52
const
char
** resolved_path) {
53
UNIMPLEMENTED
();
54
}
55
56
NamespaceScope::NamespaceScope
(Namespace* namespc,
const
char
* path) {
57
UNIMPLEMENTED
();
58
}
59
60
NamespaceScope::~NamespaceScope
() {
61
UNIMPLEMENTED
();
62
}
63
64
}
// namespace bin
65
}
// namespace dart
66
67
#endif
// defined(DART_HOST_OS_MACOS)
dart::bin::DartUtils::ScopedCopyCString
static char * ScopedCopyCString(const char *str)
Definition
dartutils.h:232
dart::bin::NamespaceScope::~NamespaceScope
~NamespaceScope()
dart::bin::NamespaceScope::NamespaceScope
NamespaceScope(Namespace *namespc, const char *path)
dart::bin::Namespace::Create
static Namespace * Create(intptr_t namespc)
dart::bin::Namespace::GetCurrent
static const char * GetCurrent(Namespace *namespc)
dart::bin::Namespace::Default
static intptr_t Default()
dart::bin::Namespace::SetCurrent
static bool SetCurrent(Namespace *namespc, const char *path)
UNIMPLEMENTED
#define UNIMPLEMENTED
Definition
dl_dispatcher.cc:36
ASSERT
#define ASSERT(E)
Definition
entrypoints_verification_test.cc:25
fdutils.h
buffer
static const uint8_t buffer[]
Definition
fl_pixel_buffer_texture_test.cc:44
result
GAsyncResult * result
Definition
fl_text_input_plugin.cc:106
namespace.h
dart
Definition
dart_vm.cc:33
globals.h
PATH_MAX
#define PATH_MAX
Definition
globals.h:708
signal_blocker.h
NO_RETRY_EXPECTED
#define NO_RETRY_EXPECTED(expression)
Definition
signal_blocker.h:75
Generated on Fri Apr 26 2024 06:14:43 for Flutter Engine by
1.9.8