diff --git a/src/LibHac/Fs/DirectoryEntry.cs b/src/LibHac/Fs/DirectoryEntry.cs
index 1d60e85d..c47a98d3 100644
--- a/src/LibHac/Fs/DirectoryEntry.cs
+++ b/src/LibHac/Fs/DirectoryEntry.cs
@@ -36,8 +36,7 @@ namespace LibHac.Fs
public enum DirectoryEntryType : byte
{
Directory,
- File,
- NotFound
+ File
}
[Flags]
diff --git a/src/LibHac/Fs/IFileSystem.cs b/src/LibHac/Fs/IFileSystem.cs
index 09c3b16d..5ec86524 100644
--- a/src/LibHac/Fs/IFileSystem.cs
+++ b/src/LibHac/Fs/IFileSystem.cs
@@ -127,11 +127,6 @@ namespace LibHac.Fs
/// If the operation returns successfully, the of the file.
/// The full path to check.
/// The of the requested operation.
- ///
- /// This function operates slightly differently than it does in Horizon OS.
- /// Instead of returning when an entry is missing,
- /// the function will return .
- ///
Result GetEntryType(out DirectoryEntryType entryType, string path);
///
diff --git a/src/LibHac/FsSystem/LayeredFileSystem.cs b/src/LibHac/FsSystem/LayeredFileSystem.cs
index 34a752de..4798ba8a 100644
--- a/src/LibHac/FsSystem/LayeredFileSystem.cs
+++ b/src/LibHac/FsSystem/LayeredFileSystem.cs
@@ -75,14 +75,14 @@ namespace LibHac.FsSystem
{
Result getEntryResult = fs.GetEntryType(out DirectoryEntryType type, path);
- if (getEntryResult.IsSuccess() && type != DirectoryEntryType.NotFound)
+ if (getEntryResult.IsSuccess())
{
entryType = type;
return Result.Success;
}
}
- entryType = DirectoryEntryType.NotFound;
+ entryType = default;
return ResultFs.PathNotFound.Log();
}
@@ -94,7 +94,7 @@ namespace LibHac.FsSystem
{
Result getEntryResult = fs.GetEntryType(out DirectoryEntryType type, path);
- if (getEntryResult.IsSuccess() && type != DirectoryEntryType.NotFound)
+ if (getEntryResult.IsSuccess())
{
return fs.GetFileTimeStampRaw(out timeStamp, path);
}
@@ -112,7 +112,7 @@ namespace LibHac.FsSystem
{
Result getEntryResult = fs.GetEntryType(out DirectoryEntryType type, path);
- if (getEntryResult.IsSuccess() && type != DirectoryEntryType.NotFound)
+ if (getEntryResult.IsSuccess())
{
return fs.QueryEntry(outBuffer, inBuffer, queryId, path);
}
diff --git a/src/LibHac/FsSystem/LocalFileSystem.cs b/src/LibHac/FsSystem/LocalFileSystem.cs
index 8946f764..110f93eb 100644
--- a/src/LibHac/FsSystem/LocalFileSystem.cs
+++ b/src/LibHac/FsSystem/LocalFileSystem.cs
@@ -308,7 +308,7 @@ namespace LibHac.FsSystem
return Result.Success;
}
- entryType = DirectoryEntryType.NotFound;
+ entryType = default;
return ResultFs.PathNotFound.Log();
}
diff --git a/src/LibHac/FsSystem/PartitionFileSystem.cs b/src/LibHac/FsSystem/PartitionFileSystem.cs
index f38763dd..7993eb27 100644
--- a/src/LibHac/FsSystem/PartitionFileSystem.cs
+++ b/src/LibHac/FsSystem/PartitionFileSystem.cs
@@ -57,7 +57,7 @@ namespace LibHac.FsSystem
protected override Result GetEntryTypeImpl(out DirectoryEntryType entryType, string path)
{
- entryType = DirectoryEntryType.NotFound;
+ entryType = default;
path = PathTools.Normalize(path);
if (path == "/")
diff --git a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs
index 56dafb95..8b84fe83 100644
--- a/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs
+++ b/src/LibHac/FsSystem/RomFs/RomFsFileSystem.cs
@@ -24,7 +24,7 @@ namespace LibHac.FsSystem.RomFs
protected override Result GetEntryTypeImpl(out DirectoryEntryType entryType, string path)
{
- entryType = DirectoryEntryType.NotFound;
+ entryType = default;
path = PathTools.Normalize(path);
if (FileTable.TryOpenFile(path, out RomFileInfo _))
diff --git a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs
index 5b8fd880..5e61542f 100644
--- a/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs
+++ b/src/LibHac/FsSystem/Save/SaveDataFileSystemCore.cs
@@ -178,7 +178,7 @@ namespace LibHac.FsSystem.Save
return Result.Success;
}
- entryType = DirectoryEntryType.NotFound;
+ entryType = default;
return ResultFs.PathNotFound.Log();
}