Switch from Nz prefix to namespace Nz for linux

Former-commit-id: 64eeaf3c633254b04910ebd4576fd9e910002be0
This commit is contained in:
Youri Hubaut
2015-09-27 15:58:49 +02:00
parent 752518ef14
commit 37586e7283
49 changed files with 3918 additions and 3732 deletions

View File

@@ -13,44 +13,51 @@
#include <Nazara/Prerequesites.hpp>
#include <Nazara/Core/File.hpp>
#include <Nazara/Core/NonCopyable.hpp>
#include <ctime>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
class NzFile;
class NzString;
class NzFileImpl : NzNonCopyable
namespace Nz
{
public:
NzFileImpl(const NzFile* parent);
~NzFileImpl() = default;
class File;
class String;
void Close();
bool EndOfFile() const;
void Flush();
nzUInt64 GetCursorPos() const;
bool Open(const NzString& filePath, unsigned int mode);
std::size_t Read(void* buffer, std::size_t size);
bool SetCursorPos(nzCursorPosition pos, nzInt64 offset);
std::size_t Write(const void* buffer, std::size_t size);
class FileImpl
{
public:
FileImpl(const File* parent);
FileImpl(const FileImpl&) = delete;
FileImpl(FileImpl&&) = delete; ///TODO
~FileImpl() = default;
static bool Copy(const NzString& sourcePath, const NzString& targetPath);
static bool Delete(const NzString& filePath);
static bool Exists(const NzString& filePath);
static time_t GetCreationTime(const NzString& filePath);
static time_t GetLastAccessTime(const NzString& filePath);
static time_t GetLastWriteTime(const NzString& filePath);
static nzUInt64 GetSize(const NzString& filePath);
static bool Rename(const NzString& sourcePath, const NzString& targetPath);
void Close();
bool EndOfFile() const;
void Flush();
UInt64 GetCursorPos() const;
bool Open(const String& filePath, unsigned int mode);
std::size_t Read(void* buffer, std::size_t size);
bool SetCursorPos(CursorPosition pos, Int64 offset);
std::size_t Write(const void* buffer, std::size_t size);
private:
int m_fileDescriptor;
mutable bool m_endOfFile;
mutable bool m_endOfFileUpdated;
};
FileImpl& operator=(const FileImpl&) = delete;
FileImpl& operator=(FileImpl&&) = delete; ///TODO
static bool Copy(const String& sourcePath, const String& targetPath);
static bool Delete(const String& filePath);
static bool Exists(const String& filePath);
static time_t GetCreationTime(const String& filePath);
static time_t GetLastAccessTime(const String& filePath);
static time_t GetLastWriteTime(const String& filePath);
static UInt64 GetSize(const String& filePath);
static bool Rename(const String& sourcePath, const String& targetPath);
private:
int m_fileDescriptor;
mutable bool m_endOfFile;
mutable bool m_endOfFileUpdated;
};
}
#endif // NAZARA_FILEIMPL_HPP