| OLD | NEW |
| (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 // Shared implementation of things common between |DirectoryImpl| and | |
| 6 // |FileImpl|. | |
| 7 | |
| 8 #ifndef COMPONENTS_FILESYSTEM_SHARED_IMPL_H_ | |
| 9 #define COMPONENTS_FILESYSTEM_SHARED_IMPL_H_ | |
| 10 | |
| 11 #include "components/filesystem/public/interfaces/types.mojom.h" | |
| 12 #include "mojo/public/cpp/bindings/callback.h" | |
| 13 | |
| 14 namespace filesystem { | |
| 15 | |
| 16 // Stats the given FD (which must be valid), calling |callback| appropriately. | |
| 17 // The type in the |FileInformation| given to the callback will be assigned from | |
| 18 // |type|. | |
| 19 using StatFDCallback = mojo::Callback<void(Error, FileInformationPtr)>; | |
| 20 void StatFD(int fd, FileType type, const StatFDCallback& callback); | |
| 21 | |
| 22 // Touches the given FD (which must be valid), calling |callback| appropriately. | |
| 23 using TouchFDCallback = mojo::Callback<void(Error)>; | |
| 24 void TouchFD(int fd, | |
| 25 TimespecOrNowPtr atime, | |
| 26 TimespecOrNowPtr mtime, | |
| 27 const TouchFDCallback& callback); | |
| 28 | |
| 29 } // namespace filesystem | |
| 30 | |
| 31 #endif // COMPONENTS_FILESYSTEM_SHARED_IMPL_H_ | |
| OLD | NEW |