ppsspp/UI/DarwinFileSystemServices.h

40 lines
1.0 KiB
C
Raw Normal View History

2023-01-22 17:32:34 +00:00
//
// DarwinFileSystemServices.h
2023-01-22 17:32:34 +00:00
// PPSSPP
//
// Created by Serena on 20/01/2023.
//
2023-02-01 16:03:12 +00:00
#pragma once
2023-01-22 17:32:34 +00:00
#include "ppsspp_config.h"
#include "Common/File/Path.h"
#include "Common/System/Request.h"
2023-01-22 17:32:34 +00:00
#define PreferredMemoryStickUserDefaultsKey "UserPreferredMemoryStickDirectoryPath"
typedef std::function<void (bool, Path)> DarwinDirectoryPanelCallback;
2023-01-22 17:32:34 +00:00
/// A Class providing help functions to work with the FileSystem
/// on Darwin platforms.
class DarwinFileSystemServices {
2023-01-22 17:32:34 +00:00
public:
/// Present a panel to choose a file or directory.
void presentDirectoryPanel(
DarwinDirectoryPanelCallback,
bool allowFiles = false,
bool allowDirectories = true,
BrowseFileType fileType = BrowseFileType::ANY);
static Path appropriateMemoryStickDirectoryToUse();
static void setUserPreferredMemoryStickDirectory(Path);
2023-01-22 17:32:34 +00:00
private:
static Path __defaultMemoryStickPath();
2023-01-22 17:32:34 +00:00
#if PPSSPP_PLATFORM(IOS)
// iOS only, needed for UIDocumentPickerViewController
void *__pickerDelegate = NULL;
2023-01-22 17:32:34 +00:00
#endif // PPSSPP_PLATFORM(IOS)
};
2023-02-06 19:17:27 +00:00
void RestartMacApp();