Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(205)

Side by Side Diff: runtime/bin/namespace_macos.cc

Issue 3007703002: [dart:io] Namespaces for file IO (Closed)
Patch Set: Remove namespace_unsupported.cc Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/namespace_linux.cc ('k') | runtime/bin/namespace_patch.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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(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(const char* path) {
20 UNIMPLEMENTED();
21 return NULL;
22 }
23
24 Namespace::~Namespace() {
25 if (namespc_ != kNone) {
26 VOID_TEMP_FAILURE_RETRY(close(namespc_));
27 }
28 }
29
30 intptr_t Namespace::Default() {
31 return kNone;
32 }
33
34 const char* Namespace::GetCurrent(Namespace* namespc) {
35 char buffer[PATH_MAX];
36 if (getcwd(buffer, PATH_MAX) == NULL) {
37 return NULL;
38 }
39 return DartUtils::ScopedCopyCString(buffer);
40 }
41
42 bool Namespace::SetCurrent(Namespace* namespc, const char* path) {
43 int result = NO_RETRY_EXPECTED(chdir(path));
44 return (result == 0);
45 }
46
47 bool Namespace::ResolvePath(Namespace* namespc,
48 const char* path,
49 intptr_t* dirfd,
50 const char** resolved_path) {
51 UNIMPLEMENTED();
52 return false;
53 }
54
55 NamespaceScope::NamespaceScope(Namespace* namespc, const char* path) {
56 UNIMPLEMENTED();
57 }
58
59 NamespaceScope::~NamespaceScope() {
60 UNIMPLEMENTED();
61 }
62
63 } // namespace bin
64 } // namespace dart
65
66 #endif // defined(HOST_OS_MACOS)
OLDNEW
« no previous file with comments | « runtime/bin/namespace_linux.cc ('k') | runtime/bin/namespace_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698