Jamie Reece Wilson
7046ccec11
[+] Added new shell dirs API [+] AuOptional<AuROString> GetUserDocuments() [+] AuOptional<AuROString> GetUserDownloads() [+] AuOptional<AuROString> GetUserDesktop() [+] AuOptional<AuROString> GetUserPhotos() [+] AuOptional<AuROString> GetUserVideos() [+] AuOptional<AuROString> GetUserMusic() [*] Amend IPCHandle::InitFromSharing (use string view) [*] AuFS devices API should now use string views [*] AuProcess, Process APIs now use string views (ModuleLoadRequest, LoadModule, GetProcAddressEx, etc) [*] AuProcess, Paths APIs now use string views (GetProcessDirectory, GetProcessFullPath, etc) [*] Fix XP using common my documents vs local user documents
96 lines
3.9 KiB
C++
96 lines
3.9 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Resources.hpp
|
|
Date: 2021-6-10
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
namespace Aurora::IO::FS
|
|
{
|
|
/**
|
|
* @brief Provides an application specific storage path for sharing data amongst Aurora applications sharing the same branding info (defer to the init structure).
|
|
* This should be used for machine local configs and caches.
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetSystemDomain();
|
|
|
|
/**
|
|
* @brief Provides an application specific storage path for user-local application data, isolated with respect to your Aurora application brand info (defer to the init structure).
|
|
* This should be used for storing private user configs under an application data subdirectory.
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetProfileDomain();
|
|
|
|
|
|
AUKN_SYM bool GetSystemResourcePath(const AuROString &fileName, AuString &path);
|
|
|
|
/**
|
|
* @brief Get package path
|
|
* This could be a read-only path if relevant to the platform
|
|
* This may be `/storage/emulated/0/Android/data/` (`Context#getExternalFilesDir(java.lang.String)`)
|
|
* `/Applications/<mac bundle>`
|
|
* `\\some uwp path`
|
|
* ...on platforms with read-only application specific data directories
|
|
* @param path
|
|
* @return
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetPackagePath();
|
|
|
|
/**
|
|
* @brief Pulls the application directory as defined by the operating system standard file system hierarchy.
|
|
* This is often $XDG_CONFIG_HOME or %APPDATA%.
|
|
* This directory might be sandboxed to the user or application by the operating system.
|
|
* Are you looking for GetProfileDomain()/GetSystemDomain()? These will provide better paths for storing configs and caches respectively.
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetAppData();
|
|
|
|
/**
|
|
* @brief Pulls the users home directory, untouched
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetUserHome();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserDocuments();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserDownloads();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserDesktop();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserPhotos();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserVideos();
|
|
|
|
AUKN_SYM AuOptional<AuROString> GetUserMusic();
|
|
|
|
/**
|
|
* @brief Global application data that requires no special permissions to access.
|
|
* This could be an SD-Card or user profile.
|
|
* This could be the root of the user managable aplication directory.
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetWritableAppdata();
|
|
|
|
/**
|
|
* @brief Global application data that requires special permissions to access, usually configured by a system account during installation
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetRootAppdata();
|
|
|
|
/**
|
|
* @brief Get user installable application directory
|
|
*/
|
|
AUKN_SYM AuOptional<AuROString> GetUserProgramsFolder();
|
|
|
|
/**
|
|
* @brief Creates an empty temp file and returns its' path.
|
|
* It should be marked for deletion on shutdown, or be located in a directory marked for auto-deletion, or be located on a temporary ramdisk, or exist in a temporary file system mount.
|
|
* If you can delete it for us, even better.
|
|
* Windows XP warning: this does not use C:\Windows\Temp. Check documents instead.
|
|
*/
|
|
AUKN_SYM AuOptional<AuString> NewTempFile();
|
|
|
|
/**
|
|
* @brief Creates an empty temp directory and returns its' path.
|
|
* It should be marked for deletion on shutdown, or be located in a directory marked for auto-deletion, or be located on a temporary ramdisk, or exist in a temporary file system mount.
|
|
* If you can delete it for us, even better.
|
|
* Windows XP warning: this does not use C:\Windows\Temp. Check documents instead.
|
|
*/
|
|
AUKN_SYM AuOptional<AuString> NewTempDirectory();
|
|
} |