Commit Graph

221 Commits

Author SHA1 Message Date
Unknown W. Brackets
d5dac66c7a Path: Avoid adding a double slash from root. 2021-10-20 13:01:16 -07:00
Henrik Rydgård
52527798c0 Some file move process tweaks 2021-09-19 20:23:46 +02:00
Unknown W. Brackets
6b30eade31 Common: Use 0 as unknown size in GetFileSize(). 2021-09-17 17:28:28 -07:00
Henrik Rydgård
de3d711616 Move FixPathCase to Common/File/Path 2021-09-11 21:17:23 +02:00
Henrik Rydgård
07413aa4e3 Feedback 2021-09-11 18:53:46 +02:00
Henrik Rydgård
dc520a59d3 Log the duration of directory size computations too 2021-09-11 18:17:14 +02:00
Henrik Rydgård
fcc0337576 Fix the Android recursive size computation and hook it up. 2021-09-11 18:12:30 +02:00
Henrik Rydgård
48310d15a9 Add metafilesystem hook to add optimized implementations of compute recursive directory size 2021-09-11 18:12:29 +02:00
Henrik Rydgård
e842d395fa Add untested function Android_ComputeRecursiveDirectorySize 2021-09-11 18:11:53 +02:00
Henrik Rydgård
cd79a1d92f Fix another GetFileInfo loop (GetFilesInDir now does return sizes) 2021-09-11 18:11:53 +02:00
Unknown W. Brackets
4c51f4761d http: Add Accept header as a parameter in requests. 2021-08-22 10:03:59 -07:00
Henrik Rydgård
e93dc8f231 Fix append mode through OpenCFile, fixing cheat import on scoped storage. 2021-08-14 16:57:33 +02:00
Henrik Rydgård
5de47c6cf2 Scoped storage: recognize "wt" and "rt" modes. Should fix the cheat.db issue
See #13847
2021-08-11 09:09:35 +02:00
Unknown W. Brackets
ba520120ab Windows: Avoid deprecated functions. 2021-08-07 15:50:13 -07:00
Henrik Rydgård
a0a5f7a67a Minor improvements on Android 9/10. Let the user reset to root of storage.
This includes handling weird "raw:/" content URIs. These I haven't seen
on newer versions.
2021-08-04 23:22:43 +02:00
Henrik Rydgård
dbd3d8ca2a Handle an empty path in the game browser. 2021-08-04 23:22:43 +02:00
Henrik Rydgård
64dbd97731 Address feedback 2021-08-04 23:22:43 +02:00
Henrik Rydgård
f51b8116a0 Basic flow of setting up and moving the PSP directory works now. 2021-08-04 23:22:43 +02:00
Henrik Rydgård
3be1ff6ce4 Get the new setup flow going, with a confirmation dialog etc.
Moving the folder while already installed still crashes.
2021-08-04 23:22:43 +02:00
Henrik Rydgård
5d047a394b Scoped storage: Make the home button simply go to the root of the current directory tree. 2021-07-25 19:23:10 +02:00
Henrik Rydgård
3ec13b8440 Two more functions 2021-07-25 17:32:12 +02:00
Henrik Rydgård
0997b8500c Convert four more functions to allow for error codes.
Note that they still don't actually use them...
2021-07-25 17:32:12 +02:00
Henrik Rydgård
2333239514 Change one storage function to use an error code. 2021-07-25 17:32:12 +02:00
Henrik Rydgård
ab69b896c3 Add and hook up Android_MoveFile 2021-07-25 17:32:12 +02:00
Henrik Rydgård
729496b60a Error code support preparations 2021-07-25 17:32:09 +02:00
Henrik Rydgård
c6c5a93bf4 Couple of minor things, crashfix on deserialization failure 2021-07-25 15:42:12 +02:00
Henrik Rydgård
76e8e89925 Add support for FILE_APPEND. 2021-07-25 15:42:12 +02:00
Henrik Rydgård
d5781824eb Fix lastModified, speed up Android_FileExists. Add Android_CopyFile (unused) 2021-07-24 00:33:05 +02:00
Henrik Rydgård
bd99e4a287 Greatly speed up content URI file listings by using DocumentContract queries. 2021-07-24 00:33:05 +02:00
Henrik Rydgård
96406364ca Fix for new bug in GetDirListing, oops 2021-07-19 20:43:10 +02:00
Henrik Rydgård
e73e0dc0be Fix multiple issues preventing in-game saves from working. 2021-07-19 17:34:51 +02:00
Henrik Rydgård
2f04fc1c00 Refactor DirectoryFileSystem::GetDirListing to use GetFilesInDir.
Lets us remove some platform specific code, fixing the content URI case.
2021-07-19 17:34:51 +02:00
Henrik Rydgård
bea9f67c02 Fix assorted path issues 2021-07-19 17:34:51 +02:00
Henrik Rydgård
4f10ff9d31 Add quick method to check file existence by content URI.
Seems to speed up bringing up the pause screen slightly (checking for
save state files).
2021-07-19 17:34:51 +02:00
Henrik Rydgård
15fafe5415 Fix date/time display for savestates 2021-07-19 17:34:51 +02:00
Henrik Rydgård
e1b4a9175a Add handling for Android content URIs to VFSReadFile, fixing savestate thumbnails. 2021-07-19 17:34:51 +02:00
Henrik Rydgård
b0558b2174 Assorted directory fixes 2021-07-19 17:34:50 +02:00
Henrik Rydgård
fff3850096 Add ability to rename content URI files, fixing saving save states.
buildfix
2021-07-19 17:34:50 +02:00
Henrik Rydgård
0c765c2c28 Buildfix 2021-07-19 10:42:44 +02:00
Henrik Rydgård
7c3bc01268 Make GetFilesInDir fully-featured enough to use in DirectoryFileSystem
To later reduce code duplication in #14619
2021-07-19 10:31:48 +02:00
Henrik Rydgård
58ecab849e Just some variable initialization 2021-07-18 16:00:07 +02:00
Henrik Rydgård
59e2d3556f Sort file listings from Android Content URIs. May help #14607 2021-07-12 15:10:29 +02:00
Henrik Rydgård
0a4da48978 PathBrowser: Load all types of path asynchronously. Helps with slow scoped storage listings :/ 2021-07-10 11:54:03 +02:00
Henrik Rydgård
a0bae1855f Path browser: Move special handling of Windows root directory to GetFilesInDir. 2021-07-10 11:47:03 +02:00
Unknown W. Brackets
39f479025e Io: Correct CreateFullPath() on Linux.
Fixes #14519.
2021-06-09 23:09:04 -07:00
Henrik Rydgård
308c7d693c Address more feedback 2021-06-07 00:49:31 +02:00
Henrik Rydgård
c6163fd3e4 Only log slow file listings 2021-06-07 00:26:27 +02:00
Henrik Rydgård
3737daaf0c Address more feedback, warning fix 2021-06-07 00:26:26 +02:00
Henrik Rydgård
37d651a89d Address a bunch of the feedback 2021-06-07 00:26:26 +02:00
Henrik Rydgård
9b32ea2f55 Split out AndroidStorage.cpp from android/jni/app-android.cpp, move to Common 2021-06-07 00:26:24 +02:00
Henrik Rydgård
6078701f9d Fix File::GetFileInfo for Content URIs. Can now load homebrew. 2021-06-07 00:24:52 +02:00
Henrik Rydgård
2f31cb12fb Add support for writing to file. Basics work now (having memstick on a content path) 2021-06-07 00:24:52 +02:00
Henrik Rydgård
dba0a6ba12 Rewrite CreateFullPath to be agnostic of path format. 2021-06-07 00:24:52 +02:00
Henrik Rydgård
468f3d8b3f wip
More work towards moving PSP directory
2021-06-07 00:24:52 +02:00
Henrik Rydgård
5df471577f Cleanup. Add a way to get very early log output on Android.
Cleanup in FileUtil
2021-06-07 00:24:52 +02:00
Henrik Rydgård
ccc78c42f5 Route DirectoryFileSystem::Open to Android storage. 2021-06-07 00:24:52 +02:00
Henrik Rydgård
c86c7686a8 Remove more special casing of content URIs 2021-06-07 00:24:52 +02:00
Henrik Rydgård
1eb36cd655 Remove now-unnecessary special cases in PathBrowser 2021-06-07 00:24:52 +02:00
Henrik Rydgård
825478bbf7 Remove CreateDirIn, not useful enough to keep. 2021-06-07 00:24:51 +02:00
Henrik Rydgård
5e3019073c Android content URI support in Path. 2021-06-07 00:24:51 +02:00
Henrik Rydgård
6553b96368 Remove AndroidStorageFileSystem. Not useful. 2021-06-07 00:24:51 +02:00
Henrik Rydgård
40fb114f60 Delete a couple unused constructors of IOFile 2021-06-07 00:24:51 +02:00
Henrik Rydgård
a2fa724d8e Convert GetFileSize to use Path 2021-06-07 00:24:51 +02:00
Henrik Rydgård
1f018d33c5 Start work on supporting Android Content URIs in the FileUtil API.
Add tentative Android Content URI support to much of FileUtil.h.

Buildfix

Fix some issues with the file browser in storage URIs.
2021-06-07 00:24:51 +02:00
Henrik Rydgård
b397e5c455 Assorted plumbing.
wip

Buildfix
2021-06-07 00:24:51 +02:00
Henrik Rydgård
ef607a5fe2 Implement a "FileSystem" that wraps Android content storage. So far unused. 2021-06-07 00:24:51 +02:00
Henrik Rydgård
e3cf04bb34 Implement file filters for Android in PathBrowser
asdf

Move Android file listing parsing logic into app-android.cpp.

Add utility for parsing/writing Android Content Storage URIs.

Fix some bugs. Allow upwards navigation in file browser from directories downstream from tree URIs.
2021-06-07 00:24:51 +02:00
Henrik Rydgård
87a25fd230 Start experimenting with DocumentsContract (the thing DocumentFile wraps)
wip

Some progress towards making the file browser work with DOCUMENT_TREE

More directory browsing progress

More Scoped Storage hackery. Can now browse to a folder and use PPSSPP's game browser to load ISOs from it.

Remove the defunct fdopendir approach. Buildfixes.
2021-06-07 00:24:51 +02:00
Henrik Rydgård
72915f88c8 Config: Remove the use of multiple search paths. 2021-05-30 12:39:16 +02:00
Unknown W. Brackets
ecc2f62688
Common: Zero initialize readlink buffer.
See #14483.
2021-05-27 23:12:40 -07:00
Unknown W. Brackets
ad5ef08f06 http: Improve navigating up within http:// paths.
This way, if you're browsing a remote path with dirs, or you press up,
things largely work.
2021-05-16 18:34:02 -07:00
Unknown W. Brackets
81f2184214 http: Fix remote disc browsing. 2021-05-16 17:48:25 -07:00
Unknown W. Brackets
e4dc8e6000 Common: Prevent non_path IOFile usage. 2021-05-15 11:12:56 -07:00
Unknown W. Brackets
f2b2f26e8e Common: Use Path for GetExeDirectory(). 2021-05-15 11:12:54 -07:00
Unknown W. Brackets
7b175627b3 VFS: Use Path for DirectoryAssetReader. 2021-05-15 11:12:04 -07:00
Unknown W. Brackets
82cd904e99 Common: Use Path for GetFileSize(). 2021-05-15 11:11:37 -07:00
Unknown W. Brackets
15038bb663 Common: Remove File funcs redundant with Path.
Shouldn't use these anymore anyway.
2021-05-15 11:11:37 -07:00
Unknown W. Brackets
a097403298 Common: Remove File::GetFilename(). 2021-05-14 23:08:31 -07:00
Unknown W. Brackets
d376e67f87 Common: Cleanup some Path constructions. 2021-05-14 22:48:04 -07:00
Henrik Rydgård
0cd7af44f1 Fix ZipAssetReader file listing. Fixes post shaders on Android 2021-05-13 11:49:33 +02:00
Henrik Rydgård
9c66f81cbc Address additional feedback 2021-05-13 10:39:17 +02:00
Henrik Rydgård
47039b4bcd Address all the easy feedback. Some is left. 2021-05-13 10:39:17 +02:00
Henrik Rydgård
8727679353 Clean up PathBrowser a bit
Fix UWP build

Fix booting homebrew.

Qt buildfix
2021-05-13 10:39:16 +02:00
Henrik Rydgård
2e16e83159 It never ends... 2021-05-13 10:39:16 +02:00
Henrik Rydgård
a40b1dec5f Use Path for fullName in dirlisting. Bugfixes.
Buildfixes

UWP: Buildfix.

headless: Buildfix.

Common: Buildfix.

iOS: Buildfixes.

libretro: Buildfix.

Qt: Buildfix.
2021-05-13 10:39:16 +02:00
Henrik Rydgård
ae06499a0c Change Copy, Rename to use Path. Remove std::string version of Exists().
Buildfixes

Buildfix
2021-05-13 10:39:16 +02:00
Henrik Rydgård
0d80362c30 Change parameter of DeleteDir and friends to Path 2021-05-13 10:39:16 +02:00
Henrik Rydgård
025bcb1673 Introduce Path, start using it all over the place.
Still lots left to convert!

Convert GetSysDirectory to return Path.

More buildfixing

Remove unnecessary Path( constructors
2021-05-13 10:39:16 +02:00
Unknown W. Brackets
92ace6716a Common: Fix read of special files with fake size.
On some Linux systems, /sys/ files report a size of 4096, but actually
have less content.
2021-05-11 21:57:36 -07:00
Sean McGovern
9e106e1d3d FileUtil: check for errors after a fread() in ReadFileToString() 2021-05-11 23:56:45 -04:00
Unknown W. Brackets
36549a960f Common: Fix dir listing extension filter.
Oops.  Also correct std::move() usage, which assumed it cleared the
source string.
2021-05-10 21:28:51 -07:00
Unknown W. Brackets
b3ce171523 Common: Correct ReadFileToString() with no size.
If SEEK_END returns an error, just read bit by bit.  Also remove the
unnecessary temp buffer.
2021-05-10 18:29:06 -07:00
Henrik Rydgård
d775bf4e4c
Merge pull request #14442 from unknownbrackets/path-extension
Update path extension and PSP/GAME/ handling
2021-05-10 21:05:05 +02:00
Unknown W. Brackets
f947aa4844 Common: Remove OpenCPPFile(). 2021-05-09 20:21:37 -07:00
Unknown W. Brackets
774b0e07e0 Common: Cleanup AssetReader extension filter. 2021-05-09 17:57:07 -07:00
Henrik Rydgård
74a652491c Common: Update path browser extension handling. 2021-05-09 17:56:05 -07:00
Unknown W. Brackets
3379f33882 http: Always use/require progress in requests.
This fixes several cases where we weren't passing cancel flags
consistently.
2021-05-01 11:20:05 -07:00
Unknown W. Brackets
af5618705c http: Remove timeoutless requests.
Let's always have timeouts.  This timeout is reset even when a single byte
is sent, so it's pretty generous.
2021-05-01 11:20:05 -07:00
Unknown W. Brackets
a35b21a5d7 http: Set a more useful user agent. 2021-04-30 23:12:42 -07:00
Henrik Rydgård
f4a6d291e1 Common: Capitalize setCurrentThreadName(). 2021-04-30 23:02:36 -07:00
Unknown W. Brackets
7e21e9a721 Common: Cleanup some mismatched indentation.
Also move initialization from constructors in a few places.
2021-04-30 22:59:41 -07:00
Unknown W. Brackets
58d46274ef Common: FileUtil rename buildfix. 2021-04-25 14:51:39 -07:00
Henrik Rydgård
a2a0551a83 Buildfix, and more renaming while we're at it. 2021-04-25 22:25:29 +02:00
Henrik Rydgård
d8583cd0d6 Buildfixes 2021-04-25 21:13:25 +02:00
Henrik Rydgård
770f7f60e4 Delete unused function, rename two more. 2021-04-25 20:57:37 +02:00
Henrik Rydgård
77b8a14770 Merge GetFileInfo/GetFileDetails into GetFileInfo 2021-04-25 20:52:29 +02:00
Henrik Rydgård
08843673d9 Rename a couple of functions. 2021-04-25 20:39:32 +02:00
Henrik Rydgård
1b13badeb4 Move remaining FileUtil functions into the File namespace. 2021-04-25 20:38:22 +02:00
Unknown W. Brackets
5119d79082 Build: Remove IOS define. 2021-03-02 21:04:03 -08:00
Unknown W. Brackets
58f6751891 UI: Avoid PathBrowser lock with no remote files.
Only needs locks once the thread starts.
2021-02-17 00:29:39 -08:00
Unknown W. Brackets
da2e722794 Windows: Fix some format warnings. 2021-02-14 10:30:10 -08:00
Unknown W. Brackets
0ffac20fcd Common: Include unistd.h before ctime on mingw.
This is required for localtime_r and similar to be available.
2021-02-14 10:30:10 -08:00
Unknown W. Brackets
2c165c9b6d Windows: Fix improper case or missing includes.
As per mingw errors/warnings.
2021-02-14 10:30:10 -08:00
Henrik Rydgård
76504c1a36 Remove redundant method from PathBrowser.cpp 2021-01-07 23:22:25 +01:00
Henrik Rydgård
5929c78307 Add home button on all platforms 2021-01-07 00:54:50 +01:00
Henrik Rydgård
ddb5462bce Folder browsing on main screen: Prevent navigating "up" when you can't. 2020-12-20 01:47:52 +01:00
Henrik Rydgård
aa2f102a0a PathBrowser: Show simplified version of paths under the memstick dir. 2020-12-20 01:00:07 +01:00
Henrik Rydgård
d771dca3da Fix navigation upwards from a pinned game streaming folder. Fixes #13224. 2020-12-20 00:49:56 +01:00
Henrik Rydgård
4f43cff5ca
Move fileutil, net, image loaders, ui to Common. (#13506)
* Move and rename file_util/fd_util to Common/File/FileUtil and DirListing

Let's also move net while we're at it.

Move the ZIM/PNG loaders over to Common.

Move the UI framework into Common

iOS buildfix

* Buildfix

* Buildfixes

* Apple buildfix

* This typo again..

* UWP buildfix

* Fix build of PPSSPPQt, such as it is (it's not in good condition...)

* Guess what? Another buildfix.
2020-10-04 20:48:47 +02:00
Henrik Rydgård
989e353482 Common.h shouldn't include Log.h.
Buildfixes

More buildfixes. Move JSON code to common.
2020-10-04 11:42:14 +02:00
Henrik Rydgård
9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00