Sorry, Matt, I didn't read close enough either! There are threads out
there also relating to READING large files.
However, I'd probably also suggest looking into using the java file I/O
stuff to avoid the issues relating to load a 100MB file into memory and
dealing with it.
Because I love writing java code in CF, I wrote some sample code for
you, and even tested it.
<cfscript>
srcFile = "E:\Inetpub\ajaxCFC\documentation\license.txt";
// create a FileReader object
fr = createObject("java","java.io.FileReader");
// Call the constructure with the source file path
fr.init(srcFile);
// create a BufferedReader object
br = createObject("java","java.io.BufferedReader");
// call the constructor with the FileReader as the arg
br.init(fr);
// read the first line
str = br.readLine();
// loop ... str will be undefined if there are no more lines
while (isDefined("str")) {
// do stuff with the string
writeOutput(str);
// read the next line so we can continue the loop
str = br.readLine();
}
// close the buffered reader object
br.close();
</cfscript>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246346
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4