title: How to programmatically read Mac .textClipping files?
body: <p>Those files are created whenever you drag a text selection to the Finder. The file size is always <code>0 bytes</code>. Apparently the data is stored in a resource fork. </p>
  
  <p>I tried reading the resource fork[1], but get error code <code>-39</code> (end of file).</p>
  
  <p>Here some more details about the file:</p>
  
  <pre><code>$&gt;xattr  test.textClipping 
  com.apple.FinderInfo
  com.apple.ResourceFork
  </code></pre>
  
  <p>[1] <a href="http://www.cocoadev.com/index.pl?UsingResourceForks" rel="noreferrer">http://www.cocoadev.com/index.pl?UsingResourceForks</a></p>