Skip to content

Commit 03bb6e2

Browse files
authored
fs: add File::max_buf_size (#7594)
1 parent ac4c959 commit 03bb6e2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tokio/src/fs/file.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,11 @@ impl File {
579579
pub fn set_max_buf_size(&mut self, max_buf_size: usize) {
580580
self.max_buf_size = max_buf_size;
581581
}
582+
583+
/// Get the maximum buffer size for the underlying [`AsyncRead`] / [`AsyncWrite`] operation.
584+
pub fn max_buf_size(&self) -> usize {
585+
self.max_buf_size
586+
}
582587
}
583588

584589
impl AsyncRead for File {

0 commit comments

Comments
 (0)