The current position of file as (success, position).
file_tell :: (file: File) -> (success: bool, position: s64)
The same answer as file_current_position, with the two results in the other order: that one returns the
position first. Both orders are kept because programs rely on each.
Parameters
- file: File
Returns
- success: bool
- position: s64
#import "Extensions/Environment";
base := environment_variable("TMPDIR");
if base == "" base = environment_variable("TEMP");
if base == "" base = "/tmp";
path := tprint("%/jai-doc-tell.bin", base);
defer file_delete(path);
assert(write_entire_file(path, "abc"));
file, ok := file_open(path);
assert(ok);
defer file_close(*file);
success, position := file_tell(file);
assert(success && position == 0);