Skip to content

Commit deae86f

Browse files
committed
use IORing.Offset as return type for getSize()
1 parent 1679a5e commit deae86f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/IORingUtils/Extensions.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ public extension FileDescriptorRepresentable {
141141
}
142142
}
143143

144-
func getSize() throws -> Int64 {
144+
func getSize() throws -> IORing.Offset {
145145
var st = stat()
146146

147147
try Errno.throwingGlobalErrno {
148148
fstat(fileDescriptor, &st)
149149
}
150150

151151
if st.st_mode & S_IFMT == S_IFREG {
152-
return Int64(st.st_size)
152+
return IORing.Offset(st.st_size)
153153
} else {
154154
throw Errno.invalidArgument
155155
}

0 commit comments

Comments
 (0)