title: Is it possible to access the correct URL.resourceValues for an iCloud file that isn't downloaded?
body: <h3>Problem</h3>
  <p>When grabbing the <code>.fileSizeKey</code> and <code>.localizedTypeDescriptionKey</code> on a <code>URL.resourceValues</code>'s for an non-downloaded iCloud file with the <code>.icloud</code> extension, I get an incorrect file size and the description is listed as Alias.</p>
  <pre class="lang-swift prettyprint-override"><code>var url = URL(fileURLWithPath: &quot;/.image.png.icloud&quot;)
  var fileResources: URLResourceValues?
  
  let keys: Set&lt;URLResourceKey&gt; = [.localizedTypeDescriptionKey, .fileSizeKey]
  
  do {
      guard let resources = try url?.resourceValues(forKeys: keys) else { return }
      fileResources = resources
  } catch {}
  
  print(fileResources?.localizedTypeDescription) // Alias
  print(fileResources?.fileSize) // 192 bytes (when it should be 4MB)
  </code></pre>
  <h3>What I've Tried</h3>
  <ol>
  <li>I've tried setting up a <code>NSFileCoordinator()</code> to request the metadata for the file but that didn't work.</li>
  </ol>
  <pre class="lang-swift prettyprint-override"><code>var error: NSError?
  let coordinator = NSFileCoordinator(filePresenter: nil)
  coordinator.coordinate(readingItemAt: url!, options: .immediatelyAvailableMetadataOnly, error: &amp;error) { URL in
      do {
          let resources = try URL.promisedItemResourceValues(forKeys: [.fileSizeKey])
          print(resources.fileSize) // 192 bytes (file type reads as Alias too)
      } catch {}
  }
  </code></pre>
  <ol start="2">
  <li>I've also tried MDItem and it does work, but it's unreliable because sometimes there's no metadata (on mail files for example) and I had to turn off sandboxing to get it to work.</li>
  </ol>
  <pre class="lang-swift prettyprint-override"><code>let md = MDItemCreateWithURL(kCFAllocatorDefault, url! as CFURL) // nil if sandbox is enabled
  let meta = MDItemCopyAttribute(md, kMDItemFSSize)
  print(meta) // 4MB (correct size)
  </code></pre>
  <ol start="3">
  <li>I've also tried taking the <code>.image.png.icloud</code> url and tried to find the alias original url, but it doesn't seem possible as the file isn't actually an alias.</li>
  </ol>
  <h3>What I'm Considering</h3>
  <p>I imagine this is possible somehow as Finder's Get Info Pane has no problem getting the info. I've wondered if maybe it's possible to change the file and remove the <code>'.'</code> and the <code>'.icloud'</code> components of the url temporarily but I'm not sure how to go about this because I believe it involves duplication or copying of the file.</p>
  <p><strong>Thank you in advance!</strong></p>