fm_file_attributes
status.i4.v = fm_file_attributes(file_name.i1a.r [,file_org.i4.r]
[,record_format.i4.r]
[,max_rec_len.i4.r] [,file_size.i4.r]
[,longest_rec.i4.r])
This routine returns file attributes for Filesharing files.
file_name Filesharing file name excluding the prefix
of "rsx$fshare_applicat_" (must be null terminated)
[file_org] returned file organization (default is NULL)
(FMNGR_SEQUENTIAL_ORG -> sequential file,
FMNGR_RELATIVE_ORG -> relative file,
FMNGR_INDEXED_ORG -> indexed file)
[record_format] returned record format (default is NULL)
(FMNGR_FIXED_LENGTH -> fixed length recordds,
FMNGR_VARIABLE_LENGTH -> variable length records,
FMNGR_STREAM_FORMAT -> stream records)
[max_rec_len] returned maximum record length in bytes
(default is NULL)
[file_size] returned current file size in blocks (default is NULL)
[longest_rec] returned longest record in file (sequential files only)
(default is NULL)
This function returns ACNET status values as follows:
OK success
CBS_NO_SUCH file does not exist
This function requires the following include files:
cnsparam_h, cbslib_h, acnet_errors_h
Related functions:
fm_open(_c), fm_close(_c), fm_open_io(_c), fm_open_read(_c),
fm_open_write(_c), fm_read(_c), fm_write(_c)
C/C++ usage:
static const char file_name[] = "controls_misc:my_file.dat";
int status;
int file_org;
int record_format;
int max_rec_len;
int file_size;
int longest_rec;
status = fm_file_attributes(file_name,&file_org,&record_format,
&max_rec_len,&file_size,&longest_rec);