mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Mention file length in bytes in readFileSize explicitly (#2572)
The rest of the functions on `NonBlockingFileIO` are explicit in the fact that they count buffer length in bytes. `readFileSize` should be explicit in its documentation too.
This commit is contained in:
1 parent
86d05fb79f
commit
39d1be7fc9
1 file changed
+2
-2
@@ -376,12 +376,12 @@ public struct NonBlockingFileIO: Sendable {
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns the length of the file associated with `fileHandle`.
|
||||
/// Returns the length of the file in bytes associated with `fileHandle`.
|
||||
///
|
||||
/// - parameters:
|
||||
/// - fileHandle: The `NIOFileHandle` to read from.
|
||||
/// - eventLoop: The `EventLoop` to create the returned `EventLoopFuture` from.
|
||||
/// - returns: An `EventLoopFuture` which is fulfilled if the write was successful or fails on error.
|
||||
/// - returns: An `EventLoopFuture` which is fulfilled with the length of the file in bytes if the write was successful or fails on error.
|
||||
public func readFileSize(fileHandle: NIOFileHandle,
|
||||
eventLoop: EventLoop) -> EventLoopFuture<Int64> {
|
||||
return self.threadPool.runIfActive(eventLoop: eventLoop) {
|
||||
|
||||
Reference in new issue
Block a user