<areahref="classcrashpad_1_1FileReaderInterface.html"title="An interface to read to files and other file-like objects with semantics matching the underlying plat..."alt="crashpad::FileReaderInterface"shape="rect"coords="0,56,192,80"/>
<areahref="classcrashpad_1_1FileSeekerInterface.html"title="An interface to seek in files and other file-like objects with semantics matching the underlying plat..."alt="crashpad::FileSeekerInterface"shape="rect"coords="0,0,192,24"/>
<trclass="memdesc:adcedaed4a1465abddb7ac3c1f3643ff8"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="namespacecrashpad.html#a8599600814a17d622766decd5f122a96"title="Reads from a file, retrying when interrupted on POSIX or following a short read. ">ReadFile()</a>, or provides an implementation with identical semantics. <ahref="#adcedaed4a1465abddb7ac3c1f3643ff8">More...</a><br/></td></tr>
<trclass="memitem:aadfb883a076615e7f6c2b4e4f29ce3a5"><tdclass="memItemLeft"align="right"valign="top"><aclass="el"href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> </td><tdclass="memItemRight"valign="bottom"><aclass="el"href="classcrashpad_1_1WeakStdioFileReader.html#aadfb883a076615e7f6c2b4e4f29ce3a5">Seek</a> (<aclass="el"href="namespacecrashpad.html#a1e53a1957d9edcba8b406ea632b6daf2">FileOffset</a> offset, int whence) override</td></tr>
<trclass="memdesc:aadfb883a076615e7f6c2b4e4f29ce3a5"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10"title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a> or provides an alternate implementation with identical semantics. <ahref="#aadfb883a076615e7f6c2b4e4f29ce3a5">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_classcrashpad_1_1FileReaderInterface"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_classcrashpad_1_1FileReaderInterface')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classcrashpad_1_1FileReaderInterface.html">crashpad::FileReaderInterface</a></td></tr>
<trclass="memdesc:ad046f1ebf1071eb6b92a2a8d06c14a56 inherit pub_methods_classcrashpad_1_1FileReaderInterface"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="classcrashpad_1_1FileReaderInterface.html#ad9035ff345274f33cef248712d53d9e1"title="Wraps ReadFile(), or provides an implementation with identical semantics. ">Read()</a>, ensuring that the read succeeded and exactly <em>size</em> bytes were read. <ahref="classcrashpad_1_1FileReaderInterface.html#ad046f1ebf1071eb6b92a2a8d06c14a56">More...</a><br/></td></tr>
<trclass="inherit_header pub_methods_classcrashpad_1_1FileSeekerInterface"><tdcolspan="2"onclick="javascript:toggleInherit('pub_methods_classcrashpad_1_1FileSeekerInterface')"><imgsrc="closed.png"alt="-"/> Public Member Functions inherited from <aclass="el"href="classcrashpad_1_1FileSeekerInterface.html">crashpad::FileSeekerInterface</a></td></tr>
<trclass="memdesc:a49a884bfb0a61461b0291c975aa15382 inherit pub_methods_classcrashpad_1_1FileSeekerInterface"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1"title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_CUR</code> to obtain the file’s current position. <ahref="classcrashpad_1_1FileSeekerInterface.html#a49a884bfb0a61461b0291c975aa15382">More...</a><br/></td></tr>
<trclass="memdesc:add2e1ee642d94c91ef722911e9aee250 inherit pub_methods_classcrashpad_1_1FileSeekerInterface"><tdclass="mdescLeft"> </td><tdclass="mdescRight">Wraps <aclass="el"href="classcrashpad_1_1FileSeekerInterface.html#a8d56f7d12dfcce3e4a39ad1524302aa1"title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a>, using <code>SEEK_SET</code>, ensuring that the seek succeeded and the file is positioned as desired. <ahref="classcrashpad_1_1FileSeekerInterface.html#add2e1ee642d94c91ef722911e9aee250">More...</a><br/></td></tr>
<divclass="textblock"><p>A file reader backed by a standard input/output <code>FILE*</code>. </p>
<p>This class accepts an already-open <code>FILE*</code>. It is not responsible for opening or closing this <code>FILE*</code>. Users of this class must ensure that the <code>FILE*</code> is closed appropriately elsewhere. Objects of this class may be used to read from <code>FILE*</code> objects not associated with filesystem-based files, although special attention should be paid to the <aclass="el"href="classcrashpad_1_1WeakStdioFileReader.html#aadfb883a076615e7f6c2b4e4f29ce3a5"title="Wraps LoggingSeekFile() or provides an alternate implementation with identical semantics. ">Seek()</a> method, which may not function on <code>FILE*</code> objects that do not refer to disk-based files.</p>
<p>This class is expected to be used when other code is responsible for opening <code>FILE*</code> objects and already provides <code>FILE*</code> objects. A good use would be a <aclass="el"href="classcrashpad_1_1WeakStdioFileReader.html"title="A file reader backed by a standard input/output FILE*. ">WeakStdioFileReader</a> for <code>stdin</code>. </p>
</div><h2class="groupheader">Member Function Documentation</h2>
<p>Wraps <aclass="el"href="namespacecrashpad.html#a8599600814a17d622766decd5f122a96"title="Reads from a file, retrying when interrupted on POSIX or following a short read. ">ReadFile()</a>, or provides an implementation with identical semantics. </p>
<dlclass="section return"><dt>Returns</dt><dd>The number of bytes actually read if the operation succeeded, which may be <code>0</code> or any positive value less than or equal to <em>size</em>. <code>-1</code> if the operation failed, with an error message logged. </dd></dl>
<p>Wraps <aclass="el"href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10"title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a> or provides an alternate implementation with identical semantics. </p>
<dlclass="section return"><dt>Returns</dt><dd>The return value of <aclass="el"href="namespacecrashpad.html#a3d6cedc10e24145d4a0c1000c33f8a10"title="Wraps lseek() or SetFilePointerEx(). Logs an error if the operation fails. ">LoggingSeekFile()</a>. <code>-1</code> on failure, with an error message logged.</dd></dl>
<dlclass="section note"><dt>Note</dt><dd>This method is only guaranteed to function on <code>FILE*</code> objects referring to disk-based files. </dd></dl>