Downloaded graphics from safari

Hello Experts,
I have a very basic question.
How can i access the graphic files downloaded using safari in objective C?
I used
listOfItems = [NSMutableArray alloc initWithArray:[[NSFileManager defaultManager] directoryContentsAtPath😠"/private/var/mobile/Library/Downloads/" pathsMatchingExtensions:NSArray arrayWithObjects😠"GIF", @"JPG" , nil]]
But it not works, not displaying any file.
Could you please advice that how can i access them?
Thank you.
With the published API, your application cannot access the file system outside of the application folder.
open a stream to the website in question and download them from there

Original thread: https://forums.imore.com/threads/downloaded-graphics-from-safari.181083/