From e1d7b9fc2c8780552b40e8415104b4205efe2de7 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 19 Mar 2018 22:59:38 -0500 Subject: FS: Implement DiskFileSystem::GetEntryType for existing files/directories. --- src/core/file_sys/disk_filesystem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/core/file_sys/disk_filesystem.cpp b/src/core/file_sys/disk_filesystem.cpp index e2092b9df..e02b20faf 100644 --- a/src/core/file_sys/disk_filesystem.cpp +++ b/src/core/file_sys/disk_filesystem.cpp @@ -123,8 +123,10 @@ ResultVal Disk_FileSystem::GetEntryType(const std::string& p return ERROR_PATH_NOT_FOUND; } - // TODO(Subv): Find out the EntryType values - UNIMPLEMENTED_MSG("Unimplemented GetEntryType"); + if (FileUtil::IsDirectory(full_path)) + return MakeResult(EntryType::Directory); + + return MakeResult(EntryType::File); } ResultVal Disk_Storage::Read(const u64 offset, const size_t length, u8* buffer) const { -- cgit v1.2.3