@@ -686,33 +686,33 @@ bool FSTVolume::OpenFile(std::string_view path, FSTFileHandle& fileHandleOut, bo
686
686
return true ;
687
687
}
688
688
689
- bool FSTVolume::IsDirectory (FSTFileHandle& fileHandle) const
689
+ bool FSTVolume::IsDirectory (const FSTFileHandle& fileHandle) const
690
690
{
691
691
cemu_assert_debug (fileHandle.m_fstIndex < m_entries.size ());
692
692
return m_entries[fileHandle.m_fstIndex ].GetType () == FSTEntry::TYPE::DIRECTORY;
693
693
};
694
694
695
- bool FSTVolume::IsFile (FSTFileHandle& fileHandle) const
695
+ bool FSTVolume::IsFile (const FSTFileHandle& fileHandle) const
696
696
{
697
697
cemu_assert_debug (fileHandle.m_fstIndex < m_entries.size ());
698
698
return m_entries[fileHandle.m_fstIndex ].GetType () == FSTEntry::TYPE::FILE;
699
699
};
700
700
701
- bool FSTVolume::HasLinkFlag (FSTFileHandle& fileHandle) const
701
+ bool FSTVolume::HasLinkFlag (const FSTFileHandle& fileHandle) const
702
702
{
703
703
cemu_assert_debug (fileHandle.m_fstIndex < m_entries.size ());
704
704
return HAS_FLAG (m_entries[fileHandle.m_fstIndex ].GetFlags (), FSTEntry::FLAGS::FLAG_LINK);
705
705
};
706
706
707
- std::string_view FSTVolume::GetName (FSTFileHandle& fileHandle) const
707
+ std::string_view FSTVolume::GetName (const FSTFileHandle& fileHandle) const
708
708
{
709
709
if (fileHandle.m_fstIndex > m_entries.size ())
710
710
return " " ;
711
711
const char * entryName = m_nameStringTable.data () + m_entries[fileHandle.m_fstIndex ].nameOffset ;
712
712
return entryName;
713
713
}
714
714
715
- std::string FSTVolume::GetPath (FSTFileHandle& fileHandle) const
715
+ std::string FSTVolume::GetPath (const FSTFileHandle& fileHandle) const
716
716
{
717
717
std::string path;
718
718
auto & entry = m_entries[fileHandle.m_fstIndex ];
@@ -743,7 +743,7 @@ std::string FSTVolume::GetPath(FSTFileHandle& fileHandle) const
743
743
return path;
744
744
}
745
745
746
- uint32 FSTVolume::GetFileSize (FSTFileHandle& fileHandle) const
746
+ uint32 FSTVolume::GetFileSize (const FSTFileHandle& fileHandle) const
747
747
{
748
748
if (m_entries[fileHandle.m_fstIndex ].GetType () != FSTEntry::TYPE::FILE)
749
749
return 0 ;
@@ -994,6 +994,7 @@ bool FSTVolume::OpenDirectoryIterator(std::string_view path, FSTDirectoryIterato
994
994
if (!IsDirectory (fileHandle))
995
995
return false ;
996
996
auto const & fstEntry = m_entries[fileHandle.m_fstIndex ];
997
+ directoryIteratorOut.dirHandle = fileHandle;
997
998
directoryIteratorOut.startIndex = fileHandle.m_fstIndex + 1 ;
998
999
directoryIteratorOut.endIndex = fstEntry.dirInfo .endIndex ;
999
1000
directoryIteratorOut.currentIndex = directoryIteratorOut.startIndex ;
0 commit comments