From 02830985a18950497003f3392cf8d6cc30c15c50 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sat, 5 Oct 2013 04:55:11 +0100 Subject: Move stuff around a bit: - Create FileSystem class: * Move ServerConfig::CleanFilename to FileSystem::GetFileName and rewrite. * Move ServerConfig::ExpandPath to FileSystem. * Move ServerConfig::FileExists to FileSystem. * Move ServerConfig::StartsWithWindowsDriveLetter to FileSystem. - Move FileReader to fileutils.cpp and fix documentation. - Move UserManager::DoBackgroundUserStuff to usermanager.cpp. --- include/modules.h | 38 -------------------------------------- 1 file changed, 38 deletions(-) (limited to 'include/modules.h') diff --git a/include/modules.h b/include/modules.h index 931d85032..b7cffd1a0 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1078,44 +1078,6 @@ class CoreExport Module : public classbase, public usecountbase virtual void OnSetUserIP(LocalUser* user); }; -/** Provides an easy method of reading a text file into memory. */ -class CoreExport FileReader : public classbase -{ - /** The lines of text in the file. - */ - std::vector lines; - - /** Content size in bytes - */ - unsigned long totalSize; - - public: - /** Initializes a new file reader. - */ - FileReader() : totalSize(0) { } - - /** Initializes a new file reader and reads the specified file. - * @param filename The file to read into memory. - */ - FileReader(const std::string& filename); - - /** Loads a text file from disk. - * @param filename The file to read into memory. - * @throw CoreException The file can not be loaded. - */ - void Load(const std::string& filename); - - /** Retrieves the entire contents of the file cache as a single string. - */ - std::string GetString(); - - /** Retrieves the entire contents of the file cache as a vector of strings. - */ - const std::vector& GetVector() { return lines; } - - unsigned long TotalSize() { return totalSize; } -}; - /** A list of modules */ typedef std::vector IntModuleList; -- cgit v1.2.3