Skip to content

Commit 6da4b3f

Browse files
committed
Add an accessor for the file descriptor
1 parent 4fd0a15 commit 6da4b3f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,11 @@ impl<'a> Drop for LargeObject<'a> {
147147
}
148148

149149
impl<'a> LargeObject<'a> {
150+
/// Returns the file descriptor of the opened file.
151+
pub fn fd(&self) -> i32 {
152+
self.fd
153+
}
154+
150155
/// Truncates the object to the specified size.
151156
///
152157
/// If `len` is larger than the size of the object, it will be padded with

0 commit comments

Comments
 (0)