diff options
| author | Frederick Martian <fredmartian@gmail.com> | 2025-10-25 17:08:35 +0200 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-12-10 20:33:58 +0200 |
| commit | 3ca3ea75c333078013914e174564340f894573e2 (patch) | |
| tree | c12dfa3492102e87c153a997d946c1d173a35666 /indra/llcommon/llfile.h | |
| parent | 79f21027371f32a9268ce8d944e3d4727ddd8b55 (diff) | |
Add a new static function LLFile::size() to determine the size of a file_name.
Replace LLAPRFile::remove(), LLAPRFile::size() and LLAPRFile::isExist() with according functions from LLFile and retire these LLAPRFile methods and the never used LLAPRFile::rename(), LLAPRFile::makeDir() and LLAPRFile::removeDir() functions.
Also clean up remarks about the threading safety of the APRCachePool, which is not used in these locations anymore.
Diffstat (limited to 'indra/llcommon/llfile.h')
| -rw-r--r-- | indra/llcommon/llfile.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h index 04a2946ac4..61ec8a5e4e 100644 --- a/indra/llcommon/llfile.h +++ b/indra/llcommon/llfile.h @@ -148,6 +148,13 @@ public: /// @returns 0 on failure and a st_mode value with either S_IFDIR or S_IFREG set otherwise /// together with the three access bits which under Windows only the write bit is relevant. + /// get the size of a file in bytes + static S64 size(const std::string& filename, int suppress_error = ENOENT); + ///> returns the size of a file in bytes + /// we pass by default ENOENT in the optional 'suppress_error' parameter to not spam the log with + /// warnings when the file does not exist + /// @returns the file size on success and 0 on failure. + /// check if filename is an existing directory static bool isdir(const std::string& filename); ///< @returns true if the path is for an existing directory |
