git repos / blockattack-game

blame: source/misc/embedded_libs/PlatformFolders-4.2.0/platform_folders.cpp

normal view · raw

c74066db Poul Sander 2022-02-16 12:14 1
/*
c74066db Poul Sander 2022-02-16 12:14 2
  Its is under the MIT license, to encourage reuse by cut-and-paste.
c74066db Poul Sander 2022-02-16 12:14 3
c74066db Poul Sander 2022-02-16 12:14 4
  Copyright (c) 2015 Poul Sander
c74066db Poul Sander 2022-02-16 12:14 5
c74066db Poul Sander 2022-02-16 12:14 6
  Permission is hereby granted, free of charge, to any person
c74066db Poul Sander 2022-02-16 12:14 7
  obtaining a copy of this software and associated documentation files
c74066db Poul Sander 2022-02-16 12:14 8
  (the "Software"), to deal in the Software without restriction,
c74066db Poul Sander 2022-02-16 12:14 9
  including without limitation the rights to use, copy, modify, merge,
c74066db Poul Sander 2022-02-16 12:14 10
  publish, distribute, sublicense, and/or sell copies of the Software,
c74066db Poul Sander 2022-02-16 12:14 11
  and to permit persons to whom the Software is furnished to do so,
c74066db Poul Sander 2022-02-16 12:14 12
  subject to the following conditions:
c74066db Poul Sander 2022-02-16 12:14 13
c74066db Poul Sander 2022-02-16 12:14 14
  The above copyright notice and this permission notice shall be
c74066db Poul Sander 2022-02-16 12:14 15
  included in all copies or substantial portions of the Software.
c74066db Poul Sander 2022-02-16 12:14 16
c74066db Poul Sander 2022-02-16 12:14 17
  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
c74066db Poul Sander 2022-02-16 12:14 18
  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
c74066db Poul Sander 2022-02-16 12:14 19
  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
c74066db Poul Sander 2022-02-16 12:14 20
  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
c74066db Poul Sander 2022-02-16 12:14 21
  BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
c74066db Poul Sander 2022-02-16 12:14 22
  ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
c74066db Poul Sander 2022-02-16 12:14 23
  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
c74066db Poul Sander 2022-02-16 12:14 24
  SOFTWARE.
c74066db Poul Sander 2022-02-16 12:14 25
*/
c74066db Poul Sander 2022-02-16 12:14 26
c74066db Poul Sander 2022-02-16 12:14 27
#include <iostream>
c74066db Poul Sander 2022-02-16 12:14 28
#include "sago/platform_folders.h"
c74066db Poul Sander 2022-02-16 12:14 29
c74066db Poul Sander 2022-02-16 12:14 30
int main() {
c74066db Poul Sander 2022-02-16 12:14 31
	std::cout << "Config: " << sago::getConfigHome() << "\n";
c74066db Poul Sander 2022-02-16 12:14 32
	std::cout << "Data: " << sago::getDataHome() << "\n";
c74066db Poul Sander 2022-02-16 12:14 33
	std::cout << "State: " << sago::getStateDir() << "\n";
c74066db Poul Sander 2022-02-16 12:14 34
	std::cout << "Cache: " << sago::getCacheDir() << "\n";
c74066db Poul Sander 2022-02-16 12:14 35
	std::cout << "Documents: " << sago::getDocumentsFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 36
	std::cout << "Desktop: " << sago::getDesktopFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 37
	std::cout << "Pictures: " << sago::getPicturesFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 38
	std::cout << "Public: " << sago::getPublicFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 39
	std::cout << "Music: " << sago::getMusicFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 40
	std::cout << "Video: " << sago::getVideoFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 41
	std::cout << "Download: " << sago::getDownloadFolder() << "\n";
c74066db Poul Sander 2022-02-16 12:14 42
	std::cout << "Save Games 1: " << sago::getSaveGamesFolder1() << "\n";
c74066db Poul Sander 2022-02-16 12:14 43
	std::cout << "Save Games 2: " << sago::getSaveGamesFolder2() << "\n";
c74066db Poul Sander 2022-02-16 12:14 44
	std::vector<std::string> extraData;
c74066db Poul Sander 2022-02-16 12:14 45
	sago::appendAdditionalDataDirectories(extraData);
c74066db Poul Sander 2022-02-16 12:14 46
	for (size_t i=0; i < extraData.size(); ++i) {
c74066db Poul Sander 2022-02-16 12:14 47
		std::cout << "Additional data " << i << ": " << extraData.at(i) << "\n";
c74066db Poul Sander 2022-02-16 12:14 48
	}
c74066db Poul Sander 2022-02-16 12:14 49
	return 0;
c74066db Poul Sander 2022-02-16 12:14 50
}
1970-01-01 00:00 51