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

Side by Side Diff: mojo/services/files/public/c/lib/directory_wrapper.h

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_FILES_C_LIB_DIRECTORY_WRAPPER_H_
6 #define SERVICES_FILES_C_LIB_DIRECTORY_WRAPPER_H_
7
8 #include <memory>
9
10 #include "files/public/c/mojio_sys_types.h"
11 #include "files/public/interfaces/directory.mojom.h"
12 #include "mojo/public/c/system/macros.h"
13
14 namespace mojio {
15
16 class ErrnoImpl;
17 class FDImpl;
18
19 // TODO(vtl): Probably this should be made into an implementation of |FDImpl|
20 // (with additional methods) and renamed |DirectoryFDImpl|, to support opening
21 // directories, |openat()|, etc>
22 class DirectoryWrapper {
23 public:
24 DirectoryWrapper(ErrnoImpl* errno_impl, mojo::files::DirectoryPtr directory);
25 ~DirectoryWrapper();
26
27 std::unique_ptr<FDImpl> Open(const char* path, int oflag, mojio_mode_t mode);
28 bool Chdir(const char* path);
29
30 // TODO(vtl): MkDir(), etc.
31
32 // Mostly for tests:
33 mojo::files::DirectoryPtr& directory() { return directory_; }
34
35 private:
36 ErrnoImpl* const errno_impl_;
37 mojo::files::DirectoryPtr directory_;
38
39 MOJO_DISALLOW_COPY_AND_ASSIGN(DirectoryWrapper);
40 };
41
42 } // namespace mojio
43
44 #endif // SERVICES_FILES_C_LIB_DIRECTORY_WRAPPER_H_
OLDNEW
« no previous file with comments | « mojo/services/files/public/c/BUILD.gn ('k') | mojo/services/files/public/c/lib/directory_wrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698