ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

storagefile.cpp

Go to the documentation of this file.
00001 /* ScummVM - Graphic Adventure Engine
00002  *
00003  * ScummVM is the legal property of its developers, whose names
00004  * are too numerous to list here. Please refer to the COPYRIGHT
00005  * file distributed with this source distribution.
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #include "backends/cloud/storagefile.h"
00024 
00025 namespace Cloud {
00026 
00027 StorageFile::StorageFile() {
00028     _id = "";
00029     _path = "";
00030     _name = "";
00031     _size = 0;
00032     _timestamp = 0;
00033     _isDirectory = false;
00034 }
00035 
00036 StorageFile::StorageFile(Common::String pth, uint32 sz, uint32 ts, bool dir) {
00037     _id = pth;
00038     _path = pth;
00039 
00040     _name = pth;
00041     if (_name.size() != 0) {
00042         uint32 i = _name.size() - 1;
00043         while (true) {
00044             if (_name[i] == '/' || _name[i] == '\\') {
00045                 _name.erase(0, i + 1);
00046                 break;
00047             }
00048             if (i == 0)
00049                 break;
00050             --i;
00051         }
00052     }
00053 
00054     _size = sz;
00055     _timestamp = ts;
00056     _isDirectory = dir;
00057 }
00058 
00059 StorageFile::StorageFile(Common::String fileId, Common::String filePath, Common::String fileName, uint32 sz, uint32 ts, bool dir) {
00060     _id = fileId;
00061     _path = filePath;
00062     _name = fileName;
00063     _size = sz;
00064     _timestamp = ts;
00065     _isDirectory = dir;
00066 }
00067 
00068 } // End of namespace Cloud


Generated on Sat Mar 16 2019 05:01:55 for ResidualVM by doxygen 1.7.1
curved edge   curved edge