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.
This commit is contained in:
Henrik Rydgård 2021-04-26 23:34:20 +02:00
parent b397e5c455
commit 1f018d33c5
8 changed files with 187 additions and 15 deletions

View file

@ -615,9 +615,15 @@ static bool TestAndroidContentURI() {
AndroidStorageContentURI treeURI;
EXPECT_TRUE(treeURI.Parse(std::string(treeURIString)));
AndroidStorageContentURI dirURI;
EXPECT_TRUE(dirURI.Parse(std::string(directoryURIString)));
AndroidStorageContentURI fileURI;
EXPECT_TRUE(fileURI.Parse(std::string(fileURIString)));
std::string lastPart = dirURI.GetLastPart();
EXPECT_EQ_STR(fileURI.GetLastPart(), std::string("Tekken 6.iso"));
EXPECT_TRUE(treeURI.TreeContains(fileURI));
EXPECT_TRUE(fileURI.CanNavigateUp());