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.
5 // Shared implementation of things common between |DirectoryImpl| and
8 #ifndef SERVICES_FILES_SHARED_IMPL_H_
9 #define SERVICES_FILES_SHARED_IMPL_H_
11 #include "components/filesystem/public/interfaces/types.mojom.h"
12 #include "mojo/public/cpp/bindings/callback.h"
17 // Stats the given FD (which must be valid), calling |callback| appropriately.
18 // The type in the |FileInformation| given to the callback will be assigned from
20 using StatFDCallback
= Callback
<void(Error
, FileInformationPtr
)>;
21 void StatFD(int fd
, FileType type
, const StatFDCallback
& callback
);
23 // Touches the given FD (which must be valid), calling |callback| appropriately.
24 using TouchFDCallback
= Callback
<void(Error
)>;
26 TimespecOrNowPtr atime
,
27 TimespecOrNowPtr mtime
,
28 const TouchFDCallback
& callback
);
33 #endif // SERVICES_FILES_SHARED_IMPL_H_