rv = NS_NewLocalFile(path, getter_AddRefs(file));
rv = NS_NewLocalFile(path, PR_FALSE, getter_AddRefs(file));
Simulated_nsFileTransport_Run(nsReader* reader, const char* path){    // duplicate the work of nsFileTransport::Run here#define NS_FILE_TRANSPORT_BUFFER_SIZE (4*1024)    nsresult rv;    nsCOMPtr<nsIInputStream> fileStr;    nsIBufferInputStream* bufStr = nsnull;    PRUint32 sourceOffset = 0;    nsCOMPtr<nsIBufferOutputStream> out;    nsCOMPtr<nsILocalFile> file;    rv = reader->OnStartRequest(nsnull, nsnull);    if (NS_FAILED(rv)) goto done;       // XXX should this abort the transfer?    rv = NS_NewLocalFile(path, getter_AddRefs(file));    if (NS_FAILED(rv)) goto done;    rv = NS_NewLocalFileInputStream(getter_AddRefs(fileStr), file);    if (NS_FAILED(rv)) goto done;    rv = NS_NewPipe(&bufStr, getter_AddRefs(out), nsnull,                    NS_FILE_TRANSPORT_BUFFER_SIZE,                    NS_FILE_TRANSPORT_BUFFER_SIZE);    if (NS_FAILED(rv)) goto done;    /*    if ( spec.GetFileSize() == 0) goto done;    */    while (PR_TRUE) {        PRUint32 amt;		    /* id'l change to FillFrom... */        PRInt64 size;        rv = file->GetFileSize(&size);        if (NS_FAILED(rv)) break;        rv = out->WriteFrom(fileStr, nsInt64(size), &amt);        if (NS_FAILED(rv) || amt == 0) break;        rv = reader->OnDataAvailable(nsnull, nsnull, bufStr, sourceOffset, amt);        if (NS_FAILED(rv)) break;        sourceOffset += amt;    }  done:    NS_IF_RELEASE(bufStr);    rv = reader->OnStopRequest(nsnull, nsnull, rv, nsnull);    return rv;}