Function getEndPos [src]

TODO: integrate with async I/O

Prototype

pub fn getEndPos(self: File) GetSeekPosError!u64

Parameters

self: File

Possible Errors

AccessDenied SeekError

In WASI, this error may occur when the file descriptor does not hold the required rights to seek on it.

PermissionDenied FStatError
SystemResources FStatError
Unexpected UnexpectedError

The Operating System returned an undocumented error code.

This error is in theory not possible, but it would be better to handle this error than to invoke undefined behavior.

When this error code is observed, it usually means the Zig Standard Library needs a small patch to add the error code to the error set for the respective function.

Unseekable SeekError

Source

pub fn getEndPos(self: File) GetSeekPosError!u64 { if (builtin.os.tag == .windows) { return windows.GetFileSizeEx(self.handle); } return (try self.stat()).size; }