diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-08-20 06:29:21 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-08-20 06:29:21 +0300 |
commit | 3a4720d1f523ca8ebee0d963604c236c08980eae (patch) | |
tree | ff5c6adb045d104aa3cce6c6c68e63e3c55659cb /indra/llfilesystem/llfilesystem.h | |
parent | 34c13264f33d9bbfc73302b84c8fade1b115fb93 (diff) | |
parent | 169599fd2f211d66f80a54e13daf975229607022 (diff) |
Merge branch 'develop' into marchcat/b-develop
# Conflicts:
# .github/workflows/build.yaml
# autobuild.xml
# indra/cmake/Copy3rdPartyLibs.cmake
# indra/cmake/FreeType.cmake
# indra/newview/llappviewer.cpp
# indra/newview/skins/default/xui/en/floater_fast_timers.xml
# indra/newview/viewer_manifest.py
# indra/test/test.cpp
Diffstat (limited to 'indra/llfilesystem/llfilesystem.h')
-rw-r--r-- | indra/llfilesystem/llfilesystem.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h index ea1b9cf3a1..10649b6920 100644 --- a/indra/llfilesystem/llfilesystem.h +++ b/indra/llfilesystem/llfilesystem.h @@ -38,20 +38,27 @@ class LLFileSystem { public: LLFileSystem(const LLUUID& file_id, const LLAssetType::EType file_type, S32 mode = LLFileSystem::READ); - ~LLFileSystem(); + ~LLFileSystem() = default; bool read(U8* buffer, S32 bytes); - S32 getLastBytesRead(); - bool eof(); + S32 getLastBytesRead() const; + bool eof() const; bool write(const U8* buffer, S32 bytes); bool seek(S32 offset, S32 origin = -1); S32 tell() const; - S32 getSize(); - S32 getMaxSize(); + S32 getSize() const; + S32 getMaxSize() const; bool rename(const LLUUID& new_id, const LLAssetType::EType new_type); - bool remove(); + bool remove() const; + + /** + * Update the "last write time" of a file to "now". This must be called whenever a + * file in the cache is read (not written) so that the last time the file was + * accessed is up to date (This is used in the mechanism for purging the cache) + */ + void updateFileAccessTime(const std::string& file_path); static bool getExists(const LLUUID& file_id, const LLAssetType::EType file_type); static bool removeFile(const LLUUID& file_id, const LLAssetType::EType file_type, int suppress_error = 0); @@ -71,8 +78,6 @@ class LLFileSystem S32 mPosition; S32 mMode; S32 mBytesRead; -//private: -// static const std::string idToFilepath(const std::string id, LLAssetType::EType at); }; #endif // LL_FILESYSTEM_H |