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:
Max Desiatov authored and GitHub committed 2023-10-24 05:41:04 -07:00
1 parent 86d05fb79f
commit 39d1be7fc9
1 file changed
+2 -2
+2 -2
View File
@@ -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) {