184
edits
(→General utilities: [move] now handles cross-device moving.) |
|||
Line 248: | Line 248: | ||
/** | /** | ||
* As [read], but do not advance | * As [read], but read from a given position and do not advance. | ||
* | |||
* @param {number} fileOffset The position in the file from which to read. | |||
* @param {ArrayBuffer} buf The buffer which will receive the data. | |||
* @param {number} offset The position in the array at which to start putting data, in bytes. | |||
* @param {number} size The maximal number of bytes to read. This method can read less bytes if the file is shorter. | |||
* @return {number} The number of bytes read. | |||
* @throws {FileDescriptorException} In case of error. | |||
*/ | */ | ||
pread: function( | pread: function(fileOffset, buf, offset, size) { | ||
//Unix: [pread] | //Unix: [pread] | ||
//Windows: [ReadFile] + [SetFilePointer] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365541(v=VS.85).aspx | //Windows: [ReadFile] + [SetFilePointer] http://msdn.microsoft.com/en-us/library/windows/desktop/aa365541(v=VS.85).aspx |
edits