Skip FileProvider folders without metadata

I want to traverse my local Google Drive folder to calculate the size of all the files on my drive.

I'm not interested in files or directories that are not present locally.

I use getattrlistbulk for traversing and it takes way too much time. I think it is because FileProvider tries to download metadata for the directories that are not yet materialised.

Is there a way to skip non-materialised directories?

Answered by DTS Engineer in 788895022

Yeah, accessing a directory in a file provider triggers the enumeration in the file provider, which enumerates the items in the directory and may take a while.

You can probably opt out the dataless file materialization by following the Prepare your app for dataless file access in TN 3150. Did you try that?

- Ziqiao Chen @ Developer Technical Support @ Apple

Accepted Answer

Yeah, accessing a directory in a file provider triggers the enumeration in the file provider, which enumerates the items in the directory and may take a while.

You can probably opt out the dataless file materialization by following the Prepare your app for dataless file access in TN 3150. Did you try that?

- Ziqiao Chen @ Developer Technical Support @ Apple

Thank you! That's exactly what I need.

Skip FileProvider folders without metadata
 
 
Q