basic.%fsize

C Function/BASIC Program, Releases: AP/Unix

Gets the size of a file.

Syntax

size=%fsize(file.descriptor)

Description

returns the size in bytes of the Unix file associated to the opened 'file.descriptor' returned by a previous call to '%open()' or '%creat()'.

If the file does not exists or is not readable, '-1' is returned.

See Also

Command Name Type Description
basic.cfunc Definition can be called from a Pick/BASIC program or subroutine in AP/DOS and AP/Unix implementations using a syntax similar to that of normal C.
basic.cfunction Definition Declare a list of C functions.
basic.%open C Function Opens a Unix file for reading or writing.
basic.%close C Function Closes a Unix file.
basic.%creat C Function Creates new Unix file, or rewrites to existing file.

User Comments

What do you think?

Share your experience or ask a question by using the form below.

Login to leave your comments.