summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/File.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2020-08-19Add FileStream wrapperTiger Wang1-1/+26
2020-07-23Update submodulesTiger Wang1-6/+2
2020-07-19Precompile unordered_map/setTiger Wang1-0/+1
+ Add inclusions to Globals.h * Sort Globals.h - Remove sys/stat.h from Globals.h
2020-07-13Remove unnecessary includesTiger Wang1-0/+2
2020-07-06Update fmtlib to 7.0.0Peter Bell1-1/+1
2020-05-07Remove old Android leftovers (#4722)Mat1-4/+4
2020-05-05Update fmt to 6.2.0 (#4718)peterbell101-3/+4
* Update fmt to 6.2.0
2018-08-13Fix: Create players folder recursively (#4283)Nate1-2/+5
Problem: On a new server the players folder was not created on windows. Root Cause: `GetUUIDFolderName` was returning a folder structure for players with `/` while CreateFolderRecursively was checking for `\\` for win32. The fix is to recognise both forward and backward slashes as file separators on windows. Fixes #4284
2018-07-26CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell101-1/+0
Add check for number of empty lines between functions and fix the corresponding failures
2018-05-02Prefer static_cast to reinterpret_cast (#4223)peterbell101-1/+1
* Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
2018-01-03Add the fmt library (#4065)peterbell101-6/+2
* Replaces AppendVPrintf with fmt::sprintf * fmt::ArgList now used as a type safe alternative to varargs. * Removed SIZE_T_FMT compatibility macros. fmt::sprintf is fully portable and supports %zu. * Adds FLOG functions to log with fmt's native formatting style.
2017-03-16Removed unnecessary check for lower and upper folderLukas Pioch1-6/+0
2016-12-12Use CMake's Android generators to crosscompileTiger Wang1-1/+5
2016-08-07Removed "." and ".." from cFile:GetFolderContents(). (#3301)Mattes D1-0/+14
2016-02-05Bulk clearing of whitespaceLogicParrot1-21/+21
2015-12-17Moved variables into scope, removed unused variables and fixed variablesLukas Pioch1-1/+1
2015-10-30Changed for-loop iterator in File.cpp to a reference type to reduce object copying and fix the clang build.bibo381-1/+1
Fixes #2580
2015-09-26Extended and fixed the cFile API.Mattes D1-58/+148
2015-07-31Moved AString reading hack to cFile.Mattes D1-4/+25
2015-07-29Silenced and fixed many warning messages across multiple files.Samuel Barney1-5/+5
2015-05-19Finish fixing windowstycho1-2/+2
2015-05-19Properly fix cFile Warningstycho1-7/+7
2015-05-19Fixed a lot of warningstycho1-7/+19
2015-04-11cFile:ChangeFileExt now accepts extensions with leading dot, too.Mattes D1-2/+14
2015-04-11Added more cFile API functions.Mattes D1-2/+54
GetLastModificationTime, GetPathSeparator() and GetExecutableExt()
2015-04-10Added proper implementation of cFile::ChangeFileExt().Mattes D1-2/+17
2015-04-06Added cFile:ChangeFileExt() function.Mattes D1-0/+23
2015-01-27Removed cFile::ReplaceFileNameInvalidChars().Mattes D1-23/+0
Its only usage in cProtocol18 has been changed to a simple string replace - only the IPv6's colons were causing problems.
2015-01-27cFile: Added ReplaceFileNameInvalidChars().Mattes D1-0/+23
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-11/+11
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-11/+11
2014-09-14OSSupport: Fixed UNICODE Windows builds.Mattes D1-7/+7
The files now compile even inside UNICODE applications.
2014-08-15Removed an unneeded cast.madmaxoft1-1/+1
2014-08-10First Implementatation of new Loggin frameworkTycho1-2/+3
2014-07-17Normalized comments.madmaxoft1-2/+2
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-06-30Fixed cFile compilation under MinGW.madmaxoft1-0/+3
2014-05-02Open files in shared mode on windows, so that other tools may read them.madmaxoft1-2/+2
This was the behavior before fopen_s() was used for implementation; unlike fopen(), fopen_s() opens the file in exclusive mode.
2014-04-28Template MagicTycho1-2/+2
Removed need to allocate a fake meta block by using templates to provide a version of the code that does not use metas. Also changed the function to a template argument to make sure that the compilier is able to inline it.
2014-04-26Fixed mobs that don't naturally spawn.archshift1-5/+5
2014-04-01More cFile warning fixes.madmaxoft1-1/+1
2014-04-01Fixed clang warnings in cFile.madmaxoft1-10/+10
We only support 32-bit filesizes (files < 2 GiB).
2014-02-03Fixed #491Tiger Wang1-2/+14
2014-01-25Added cFile::Flush().madmaxoft1-0/+9
This is useful when using cFile as a log file and we know the server may crash after a specific write, so we flush the file before continuing.
2014-01-16Another VarArgs fix.madmaxoft1-4/+2
This time using va_copy() on platforms that have it and simple assignment on platforms that don't.
2014-01-15Using a 2nd argument instead of va_copy().madmaxoft1-2/+4
This seems to be the only reasonable C++03-only solution.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-23Added cFile:ReadWholeFile() to Lua API.madmaxoft1-0/+16
2013-11-22Added cFile:GetFolderContents().madmaxoft1-0/+60
Fix 162.
2013-10-09Fixed cFile::CopyFile Linux compilation.madmaxoft1-7/+3
2013-10-09Moved cMakeDir::MakeDir to cFile::CreateFolder.madmaxoft1-8/+21
And exported to Lua.
2013-10-09Added static cFile functions to Lua API.madmaxoft1-4/+53
2013-09-21Fixed cFile:IsFolder() and plugin-loading.madmaxoft1-1/+2
This should fix loading plugins on Linux.
2013-09-18Proper folder / file distinction in plugin loading.madmaxoft1-0/+14
2013-05-01File: Added file rename and deletion functionsmadmaxoft@gmail.com1-0/+18
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1436 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-25AnvilStats: Added ChunkExtract mode of operation, splitting Anvil files into individual chunks.madmaxoft@gmail.com1-2/+1
Both original zlibbed chunks and re-gzipped chunks are output. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1223 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-02-07Added a cGZipFile class for reading GZipped files.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1196 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-29Extended the cFile interface with Printf()madmaxoft@gmail.com1-0/+14
git-svn-id: http://mc-server.googlecode.com/svn/trunk@901 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-23Source files cleanup: OSSupport-related files in a separate subfolder, renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@885 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-16MCServer should run just fine on Android now :Dfaketruth1-2/+2
The server is also stoppable from Android git-svn-id: http://mc-server.googlecode.com/svn/trunk@743 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-271/+271
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-23Anvil storage writing (Basic storage is working, NO entities except for chests are working! Don't use for real servers)madmaxoft@gmail.com1-1/+19
git-svn-id: http://mc-server.googlecode.com/svn/trunk@475 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-20Using own ASSERT() that logs to filefaketruth1-10/+10
git-svn-id: http://mc-server.googlecode.com/svn/trunk@297 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-1/+22
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01sprintf() begone! Replaced with StringUtils' Printf()madmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@216 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-01Fixed a sigsegv on *nix (cFile double-closing files)madmaxoft@gmail.com1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@208 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30Replaced most FILE operations with a cFile objectmadmaxoft@gmail.com1-0/+31
git-svn-id: http://mc-server.googlecode.com/svn/trunk@196 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-01-30Initial cFile implementation (using stdio FILE) and test in cChunkMapmadmaxoft@gmail.com1-0/+200
git-svn-id: http://mc-server.googlecode.com/svn/trunk@192 0a769ca7-a7f5-676a-18bf-c427514a06d6