diff options
author | chai <chaifix@163.com> | 2019-08-02 20:51:00 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-08-02 20:51:00 +0800 |
commit | bad78945ceba425f6a80e3b8dca2414d592970eb (patch) | |
tree | 8bf7540766349c534bf9e5746b24fd7507ba034e /source/modules/asura-utils/io/file_data.cpp | |
parent | 99b90496765df21c5f377f42b9ed073ccb34c1fd (diff) |
*修改文件名格式
Diffstat (limited to 'source/modules/asura-utils/io/file_data.cpp')
-rw-r--r-- | source/modules/asura-utils/io/file_data.cpp | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/source/modules/asura-utils/io/file_data.cpp b/source/modules/asura-utils/io/file_data.cpp deleted file mode 100644 index 30fa5bf..0000000 --- a/source/modules/asura-utils/io/file_data.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "file_data.h" - -namespace AsuraEngine -{ - namespace IO - { - - FileData::FileData(const std::string& filename) - : m_Data(nullptr) - , m_FileName(filename) - { - size_t dot = filename.rfind('.'); - if (dot != std::string::npos) - { - m_Extension = filename.substr(dot + 1); - m_Name = filename.substr(0, dot); - } - else - m_Name = filename; - } - - FileData::~FileData() - { - if (m_Data) - m_Data->Release(); - } - - const std::string& FileData::GetFileName() - { - return m_FileName; - } - - const std::string& FileData::GetExtension() - { - return m_Extension; - } - - const std::string& FileData::GetName() - { - return m_Name; - } - - void FileData::BindData(ASURA_MOVE DataBuffer* buffer) - { - if (!buffer) - return; - if (m_Data) - m_Data->Release(); - m_Data = buffer; - m_Data->Retain(); - } - - DataBuffer* FileData::GetDataBuffer() - { - return m_Data; - } - - } -}
\ No newline at end of file |