ppsspp/UI/DarwinFileSystemServices.h

42 lines
1.1 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.
static void presentDirectoryPanel(
DarwinDirectoryPanelCallback panelCallback,
bool allowFiles = false,
bool allowDirectories = true,
BrowseFileType fileType = BrowseFileType::ANY);
static Path appropriateMemoryStickDirectoryToUse();
static void setUserPreferredMemoryStickDirectory(Path);
static Path defaultMemoryStickPath();
static void ClearDelegate();
2023-01-22 17:32:34 +00:00
private:
#if PPSSPP_PLATFORM(IOS)
// iOS only, needed for UIDocumentPickerViewController
static void *__pickerDelegate;
2023-01-22 17:32:34 +00:00
#endif // PPSSPP_PLATFORM(IOS)
};
2023-02-06 19:17:27 +00:00
void RestartMacApp();