tf_get_size(), sf_get_size()

Purpose

Obtains the size of a file

Old names

#define _vfsize tf_get_size

#define _afsize sf_get_size

Syntax (CCOWN)

file_pointer tf_get_size(int file_handle)
file_pointer sf_get_size(int file_handle)

Syntax (DP4DBAPI)

dp4_file_size dp4_sf_get_size(FCONN * fconn);
dp5_file_size dp4_sf64_get_size(FCONN * fconn);

Parameters

int file_handle

File handle returned by tf_open() or sf_open()

 

FCONN * fconn

File handle returned by dp4_sf_open()

Description

The tf_get_size() and sf_get_size() functions give the size of a file.

The sf_get_size() function calls the file handling support in the database manager, and the tf_get_size() function calls the file handling support in the terminal manager. You must not call an sf_ function with a handle obtained with tf_open(), or a tf_ function with a handle obtained with sf_open().

Return values

Returns size of file. The DP4DBAPI versions might fail if the file handle was invalid. In this case the return value is DP4_INVALID_SIZE. or DP5_INVALID_SIZE for the 64 bit version of the API, both defined to be -1.