Change folder attribute to hidden on iOS (FMX, C++)


I want to create a directory at runtime and make it hidden. Using this example i tried the following code and it works fine on Win32 but errors on iOS build:

UnicodeString TestPath;
TestPath = System::Ioutils::TPath::GetDocumentsPath() + “\\test\\”;
TFileAttributes dirattribs;
dirattribs = TDirectory::GetAttributes(TestPath);
dirattribs = dirattribs << TFileAttribute::faHidden;
TDirectory::SetAttributes(TestPath, dirattribs);

The build error i get when building for iOS or Android is no member named ‘faHidden’ in ‘System::Ioutils::TFileAttribute’. So, how can i change folder attributes on iOS and Android?

p.s. Using Rad Studio 10.3.2 (C++ Builder).

Comments are closed.