Skip to content

Commit d666d92

Browse files
committed
Let's you know where you are in a file.
1 parent ce4a321 commit d666d92

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/lib.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,18 @@ pub struct Api {
7676
///
7777
/// Some files do not support seeking and will produce an error.
7878
pub seek_set: extern "C" fn(fd: file::Handle, position: u64) -> Result<()>,
79-
/// Move the file offset (for the given file handle) relative to the current position
79+
/// Move the file offset (for the given file handle) relative to the current position.
80+
///
81+
/// Returns the new file offset.
8082
///
8183
/// Some files do not support seeking and will produce an error.
82-
pub seek_cur: extern "C" fn(fd: file::Handle, offset: i64) -> Result<()>,
84+
pub seek_cur: extern "C" fn(fd: file::Handle, offset: i64) -> Result<u64>,
8385
/// Move the file offset (for the given file handle) to the end of the file
8486
///
87+
/// Returns the new file offset.
88+
///
8589
/// Some files do not support seeking and will produce an error.
86-
pub seek_end: extern "C" fn(fd: file::Handle) -> Result<()>,
90+
pub seek_end: extern "C" fn(fd: file::Handle) -> Result<u64>,
8791
/// Rename a file.
8892
///
8993
/// # Limitations

0 commit comments

Comments
 (0)