Ejemplo n.º 1
0
nsresult
DOMFileImplFile::GetInternalStream(nsIInputStream** aStream)
{
  return mWholeFile ?
    NS_NewLocalFileInputStream(aStream, mFile, -1, -1, sFileStreamFlags) :
    NS_NewPartialLocalFileInputStream(aStream, mFile, mStart, mLength,
                                      -1, -1, sFileStreamFlags);
}
Ejemplo n.º 2
0
void
BlobImplFile::GetInternalStream(nsIInputStream** aStream, ErrorResult& aRv)
{
  if (mWholeFile) {
    aRv = NS_NewLocalFileInputStream(aStream, mFile, -1, -1, sFileStreamFlags);
    return;
  }

  aRv = NS_NewPartialLocalFileInputStream(aStream, mFile, mStart, mLength,
                                          -1, -1, sFileStreamFlags);
}