diff options
author | Callum Prentice <callum@gmail.com> | 2020-10-06 18:18:18 -0700 |
---|---|---|
committer | Callum Prentice <callum@gmail.com> | 2020-10-06 18:18:18 -0700 |
commit | a0ea119623b8bda445f86afdb0ea7b5833c8e171 (patch) | |
tree | 5080c5d902654307306e8a94a9f0ec94a432398f /indra/llfilesystem | |
parent | 56e30615530bf5d1c86fbafee89c9998a079e88f (diff) |
Replace references to static writefile with write so we end up with only a single read and a single write function
Diffstat (limited to 'indra/llfilesystem')
-rw-r--r-- | indra/llfilesystem/llfilesystem.cpp | 13 | ||||
-rw-r--r-- | indra/llfilesystem/llfilesystem.h | 2 |
2 files changed, 7 insertions, 8 deletions
diff --git a/indra/llfilesystem/llfilesystem.cpp b/indra/llfilesystem/llfilesystem.cpp index ffc3dee12b..6d6ff3d7e1 100644 --- a/indra/llfilesystem/llfilesystem.cpp +++ b/indra/llfilesystem/llfilesystem.cpp @@ -230,6 +230,12 @@ BOOL LLFileSystem::read(U8 *buffer, S32 bytes, BOOL async, F32 priority) mReadComplete = TRUE; } + // update the last access time for the file - this is required + // even though we are reading and not writing because this is the + // way the cache works - it relies on a valid "last accessed time" for + // each file so it knows how to remove the oldest, unused files + LLFileSystem::mDiskCache->updateFileAccessTime(filename); + return success; } @@ -287,13 +293,6 @@ BOOL LLFileSystem::write(const U8 *buffer, S32 bytes) return success; } -//static -BOOL LLFileSystem::writeFile(const U8 *buffer, S32 bytes, const LLUUID &uuid, LLAssetType::EType type) -{ - LLFileSystem file(uuid, type, LLFileSystem::WRITE); - return file.write(buffer, bytes); -} - BOOL LLFileSystem::seek(S32 offset, S32 origin) { if (-1 == origin) diff --git a/indra/llfilesystem/llfilesystem.h b/indra/llfilesystem/llfilesystem.h index 789f9456c7..5d87de9bf8 100644 --- a/indra/llfilesystem/llfilesystem.h +++ b/indra/llfilesystem/llfilesystem.h @@ -1,4 +1,5 @@ /** +/** * @file filesystem.h * @brief Simulate local file system operations. * @Note The initial implementation does actually use standard C++ @@ -46,7 +47,6 @@ public: BOOL eof(); BOOL write(const U8 *buffer, S32 bytes); - static BOOL writeFile(const U8 *buffer, S32 bytes, const LLUUID &uuid, LLAssetType::EType type); BOOL seek(S32 offset, S32 origin = -1); S32 tell() const; |