<p>I've got a PHP-based site where we allow users to upload a comma-separated text file of data to be imported by some server side scripts. However, sometimes we need to adjust the column order of the data that is uploaded, and it would be immensely helpful if we could identify the columns in the CSV file <em>before</em> the upload takes place.</p>

<p>The only way I can think of to access local file I/O is with a Java plugin or an embedded Flash script, and I'd much prefer the latter. Is there any way in Flash to select a text file on the local hard drive, and then use ActionScript to examine <strong>only</strong> the first line (which corresponds to the column headings, in this example)?</p>

<p>Sometimes these files can be >100 MB, so loading the whole thing into memory and then throwing out all but the first line probably wouldn't work efficiently, so I'm wondering if there's syntax in ActionScript to limit the amount of data read in at a time.</p>

Flash movies don't have access to the local file system, except to do a file upload to the server.
I think your options are:
Process the class on the client side with Java (trivial), using an applet. However, as you rightly assert the user would need to grant permissions to the applet.
Provide a small client side application written with Adobe Air, using the
file system API
.