| // Copyright 2019 The ChromiumOS Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| #include "smbfs/test_filesystem.h" |
| // Kernel attribute cache timeout, in seconds. |
| constexpr double kAttrTimeout = 5.0; |
| TestFilesystem::TestFilesystem(uid_t uid, gid_t gid) : uid_(uid), gid_(gid) {} |
| void TestFilesystem::Lookup(std::unique_ptr<EntryRequest> request, |
| const std::string& name) { |
| request->ReplyError(ENOENT); |
| void TestFilesystem::GetAttr(std::unique_ptr<AttrRequest> request, |
| if (inode == FUSE_ROOT_ID) { |
| stat.st_mode = S_IFDIR | 0755; |
| request->ReplyAttr(stat, kAttrTimeout); |
| request->ReplyError(ENOENT); |