How can I get URL of the files in a URL?
I tried these:
directoryContents = try FileManager.default.contentsOfDirectory(at: aURL, includingPropertiesForKeys: [URLResourceKey.isRegularFileKey], options: [])
and
...contentsOfDirectory(at: aURL, includingPropertiesForKeys: nil, options: []).filter{ $0.isFileURL })
Both result is equal to
...contentsOfDirectory(at: aURL, includingPropertiesForKeys: nil, options: [])
that return the list of files and folders and it get the list without any filter and option.
Also I tried to get only directories by URLResourceKey.isDirectoryKey, but it didn't work.
How can I get the URL of files without directories?