tell


Description:

[ CCode ( cname = "ftell" ) ]
public long tell ()

Returns the file position indicator for the file stream stream.

Example: Get current position:

static int main (string[] args) {
FileStream stream = FileStream.open (args[0], "rb");
assert (stream != null);

stream.seek (0, FileSeek.END);
long size = stream.tell ();

print ("File size: %ld bytes\n", size);
return 0;
}

valac --pkg glib-2.0 GLib.FileStream.tell.vala

Returns:

file position indicator on success or GLib.FileStream.EOF if failure occurs.