summaryrefslogtreecommitdiff
path: root/indra/llcommon/llfile.h
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-29 07:43:28 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2024-04-29 07:56:09 +0300
commit1b68f71348ecf3983b76b40d7940da8377f049b7 (patch)
tree2974eddaef130a067c26033d60a59fc790365b3d /indra/llcommon/llfile.h
parentaf4ea94efc1999f3b19fd8d643d0331f0b77e265 (diff)
#824 Process source files in bulk: replace tabs with spaces, convert CRLF to LF, and trim trailing whitespaces as needed
Diffstat (limited to 'indra/llcommon/llfile.h')
-rw-r--r--indra/llcommon/llfile.h148
1 files changed, 74 insertions, 74 deletions
diff --git a/indra/llcommon/llfile.h b/indra/llcommon/llfile.h
index 9de095b45d..08a008c19a 100644
--- a/indra/llcommon/llfile.h
+++ b/indra/llcommon/llfile.h
@@ -1,4 +1,4 @@
-/**
+/**
* @file llfile.h
* @author Michael Schlachter
* @date 2006-03-23
@@ -8,21 +8,21 @@
* $LicenseInfo:firstyear=2006&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
- *
+ *
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
- *
+ *
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
+ *
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
@@ -35,16 +35,16 @@
* Attempts to mostly mirror the POSIX style IO functions.
*/
-typedef FILE LLFILE;
+typedef FILE LLFILE;
#include <fstream>
#include <sys/stat.h>
#if LL_WINDOWS
// windows version of stat function and stat data structure are called _stat
-typedef struct _stat llstat;
+typedef struct _stat llstat;
#else
-typedef struct stat llstat;
+typedef struct stat llstat;
#include <sys/types.h>
#endif
@@ -61,29 +61,29 @@ typedef struct stat llstat;
class LL_COMMON_API LLFile
{
public:
- // All these functions take UTF8 path/filenames.
- static LLFILE* fopen(const std::string& filename,const char* accessmode); /* Flawfinder: ignore */
- static LLFILE* _fsopen(const std::string& filename,const char* accessmode,int sharingFlag);
+ // All these functions take UTF8 path/filenames.
+ static LLFILE* fopen(const std::string& filename,const char* accessmode); /* Flawfinder: ignore */
+ static LLFILE* _fsopen(const std::string& filename,const char* accessmode,int sharingFlag);
- static int close(LLFILE * file);
+ static int close(LLFILE * file);
- // perms is a permissions mask like 0777 or 0700. In most cases it will
- // be overridden by the user's umask. It is ignored on Windows.
- // mkdir() considers "directory already exists" to be SUCCESS.
- static int mkdir(const std::string& filename, int perms = 0700);
+ // perms is a permissions mask like 0777 or 0700. In most cases it will
+ // be overridden by the user's umask. It is ignored on Windows.
+ // mkdir() considers "directory already exists" to be SUCCESS.
+ static int mkdir(const std::string& filename, int perms = 0700);
- static int rmdir(const std::string& filename);
- static int remove(const std::string& filename, int supress_error = 0);
- static int rename(const std::string& filename,const std::string& newname, int supress_error = 0);
- static bool copy(const std::string from, const std::string to);
+ static int rmdir(const std::string& filename);
+ static int remove(const std::string& filename, int supress_error = 0);
+ static int rename(const std::string& filename,const std::string& newname, int supress_error = 0);
+ static bool copy(const std::string from, const std::string to);
- static int stat(const std::string& filename,llstat* file_status);
- static bool isdir(const std::string& filename);
- static bool isfile(const std::string& filename);
- static LLFILE * _Fiopen(const std::string& filename,
- std::ios::openmode mode);
+ static int stat(const std::string& filename,llstat* file_status);
+ static bool isdir(const std::string& filename);
+ static bool isfile(const std::string& filename);
+ static LLFILE * _Fiopen(const std::string& filename,
+ std::ios::openmode mode);
- static const char * tmpdir();
+ static const char * tmpdir();
};
/// RAII class
@@ -158,39 +158,39 @@ private:
* Does The Right Thing when passed a non-ASCII pathname. Sadly, that isn't
* true of Microsoft's std::ifstream.
*/
-class LL_COMMON_API llifstream : public std::ifstream
+class LL_COMMON_API llifstream : public std::ifstream
{
- // input stream associated with a C stream
+ // input stream associated with a C stream
public:
- // Constructors:
- /**
- * @brief Default constructor.
- *
- * Initializes @c sb using its default constructor, and passes
- * @c &sb to the base class initializer. Does not open any files
- * (you haven't given it a filename to open).
+ // Constructors:
+ /**
+ * @brief Default constructor.
+ *
+ * Initializes @c sb using its default constructor, and passes
+ * @c &sb to the base class initializer. Does not open any files
+ * (you haven't given it a filename to open).
*/
- llifstream();
+ llifstream();
- /**
- * @brief Create an input file stream.
- * @param Filename String specifying the filename.
- * @param Mode Open file in specified mode (see std::ios_base).
- *
+ /**
+ * @brief Create an input file stream.
+ * @param Filename String specifying the filename.
+ * @param Mode Open file in specified mode (see std::ios_base).
+ *
* @c ios_base::in is automatically included in @a mode.
*/
- explicit llifstream(const std::string& _Filename,
+ explicit llifstream(const std::string& _Filename,
ios_base::openmode _Mode = ios_base::in);
- /**
- * @brief Opens an external file.
- * @param Filename The name of the file.
- * @param Node The open mode flags.
- *
- * Calls @c llstdio_filebuf::open(s,mode|in). If that function
- * fails, @c failbit is set in the stream's error state.
+ /**
+ * @brief Opens an external file.
+ * @param Filename The name of the file.
+ * @param Node The open mode flags.
+ *
+ * Calls @c llstdio_filebuf::open(s,mode|in). If that function
+ * fails, @c failbit is set in the stream's error state.
*/
- void open(const std::string& _Filename,
+ void open(const std::string& _Filename,
ios_base::openmode _Mode = ios_base::in);
};
@@ -203,37 +203,37 @@ class LL_COMMON_API llifstream : public std::ifstream
* Right Thing when passed a non-ASCII pathname. Sadly, that isn't true of
* Microsoft's std::ofstream.
*/
-class LL_COMMON_API llofstream : public std::ofstream
+class LL_COMMON_API llofstream : public std::ofstream
{
public:
- // Constructors:
- /**
- * @brief Default constructor.
- *
- * Initializes @c sb using its default constructor, and passes
- * @c &sb to the base class initializer. Does not open any files
- * (you haven't given it a filename to open).
+ // Constructors:
+ /**
+ * @brief Default constructor.
+ *
+ * Initializes @c sb using its default constructor, and passes
+ * @c &sb to the base class initializer. Does not open any files
+ * (you haven't given it a filename to open).
*/
- llofstream();
-
- /**
- * @brief Create an output file stream.
- * @param Filename String specifying the filename.
- * @param Mode Open file in specified mode (see std::ios_base).
- *
- * @c ios_base::out is automatically included in @a mode.
+ llofstream();
+
+ /**
+ * @brief Create an output file stream.
+ * @param Filename String specifying the filename.
+ * @param Mode Open file in specified mode (see std::ios_base).
+ *
+ * @c ios_base::out is automatically included in @a mode.
*/
- explicit llofstream(const std::string& _Filename,
+ explicit llofstream(const std::string& _Filename,
ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
- /**
- * @brief Opens an external file.
- * @param Filename The name of the file.
- * @param Node The open mode flags.
- *
- * @c ios_base::out is automatically included in @a mode.
+ /**
+ * @brief Opens an external file.
+ * @param Filename The name of the file.
+ * @param Node The open mode flags.
+ *
+ * @c ios_base::out is automatically included in @a mode.
*/
- void open(const std::string& _Filename,
+ void open(const std::string& _Filename,
ios_base::openmode _Mode = ios_base::out|ios_base::trunc);
};