1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<title>FS_SeekFile</title> 9<LINK rel="stylesheet" href="../../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13 14<h1 align="left">FS_SeekFile <img src="../../image/NTR.gif"align="middle"><img src="../../image/TWL.gif" align="middle"></h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <nitro/fs.h></CODE><BR> 20 <BR> 21 <CODE>BOOL FS_SeekFile( <A href="../fs_file_type.html">FSFile</a> *p_file, s32 offset, <A href="../fs_seek_file_mode_type.html">FSSeekMode</a> origin );</CODE><br> 22 <br> 23 </dd> 24</dl> 25<h2>Arguments</h2> 26<TABLE border="1" width="100%"> 27 <TBODY> 28 <TR> 29<TD width="13%"><SPAN class="argument">p_file</SPAN></TD> 30<TD width="87%">Address of the <A href="../fs_file_type.html"><CODE>FSFile</CODE></A> structure.</TD> 31 </TR> 32 <TR> 33<TD width="13%"><SPAN class="argument">offset</SPAN></TD> 34<TD width="87%">Number of bytes to move (in a positive direction from the beginning toward the end).</TD> 35 </TR> 36 <TR> 37<TD width="13%"><SPAN class="argument">origin</SPAN></TD> 38<TD width="87%">Base position of the move.</TD> 39 </TR> 40 </TBODY> 41</TABLE> 42 43<h2>Return Values</h2> 44<p><CODE>TRUE</CODE> if the file pointer is correctly moved; <CODE>FALSE</CODE> otherwise.</p> 45 46<H2>Description</H2> 47<p> 48Moves the file pointer from a base point that is specified by <SPAN class="argument">origin</SPAN> to a position that is offset by the amount that is specified by <SPAN class="argument">offset</SPAN>. The <SPAN class="argument">origin</SPAN> type is defined by the <A href="../fs_seek_file_mode_type.html"><CODE>FSSeekFileMode</CODE></a> type.</p> 49 50<p style="color:Red;"><B>Note:</B> If the new specified position is beyond the beginning or the end of the file, the NITRO-SDK and TWL-SDK yield different results.</p> 51<table> 52<tr><td>NITRO-SDK</td><td>The file pointer is corrected to fall in the bounds of the file.</td></tr> 53<tr><td>TWL-SDK</td><td>The function fails and returns <CODE>FALSE</CODE>, and the <a href="FS_GetResultCode.html"><CODE>FS_GetResultCode</CODE></a> function returns <a href="../fs_result_const.html"><CODE>FS_RESULT_INVALID_PARAMETER</CODE></a>.</td></tr> 54</table> 55 56<h2>See Also</h2> 57<p><A href="../fs_file_type.html"><CODE>FSFile</CODE></A><BR> <A href="../fs_seek_file_mode_type.html"><CODE>FSSeekFileMode</CODE></A><BR> <A href="FS_GetFileLength.html"><CODE>FS_GetFileLength</CODE></A><BR> <A href="FS_ReadFile.html"><CODE>FS_ReadFile</CODE></A><BR> <A href="FS_SeekFileToBegin.html"><CODE>FS_SeekFileToBegin</CODE></A><BR> <A href="FS_SeekFileToEnd.html"><CODE>FS_SeekFileToEnd</CODE></A></p> 58 59<H2>Revision History</H2> 60<P> 612009/07/29 Added mention that behavior differs for the NITRO-SDK and TWL-SDK when the file pointer is moved out of range.<br /> 62 2008/10/02 Updated part of <B>See Also</B>.<br /> 2004/04/01 Initial version.</P> 63<hr><p>CONFIDENTIAL</p></body> 64</html> 65