rfio_stat man page

RFIO_STAT(3) Rfio Library Functions RFIO_STAT(3)

[1mNAME[0m
rfio_stat - get information about a file or directory

[1mSYNOPSIS[0m
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_stat (const char *[4m[22mpath[24m[1m, struct stat *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_fstat (int [4m[22ms[24m[1m, struct stat *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_lstat (const char *[4m[22mpath[24m[1m, struct stat *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_mstat (const char *[4m[22mpath[24m[1m, struct stat *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_mstat_reset ();[0m
[1mint rfio_end ();[0m

Under Linux, for large files:
[1m#define _LARGEFILE64_SOURCE[0m
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_stat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_fstat64 (int [4m[22ms[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_lstat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_mstat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m

For large files, under other systems:
[1m#include <sys/types.h>[0m
[1m#include "rfio_api.h"[0m

[1mint rfio_stat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_fstat64 (int [4m[22ms[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_lstat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m
[1mint rfio_mstat64 (const char *[4m[22mpath[24m[1m, struct stat64 *[4m[22mstatbuf[24m[1m);[0m

[1mDESCRIPTION[0m
[1mrfio_stat [22mgets information about a file or directory.

[1mrfio_lstat [22mis identical to [1mrfio_stat [22mexcept for symbolic links. In this
case, the link itself is statted and not followed.

[1mrfio_fstat [22mis identical to [1mrfio_stat [22mbut works on the file descriptor [1ms[0m
returned by [1mrfio_open[22m.

[1mrfio_mstat [22mis identical to [1mrfio_stat [22mbut keeps the connection open to
the server unless there are more than MAXMCON connections already
opened. This is useful when issuing a series of stat calls. The last
[1mrfio_mstat [22mcall should be followed by a call to [1mrfio_end[22m.

[1mrfio_mstat_reset [22mis to be used when your program is forking. In such a
case the permanent connections opened with [1mrfio_mstat [22mbecome shared
between the parent and the child. Use [1mrfio_mstat_reset [22mto perform the
necessary reset and close of the socket file descriptor in the parent
or the child in order to be sure that only of them will receice an
answer from the RFIO daemon.

See NOTES section below.

[4mpath[24m specifies the logical pathname relative to the current directory
or the full pathname.

[4mstatbuf[0m
is a pointer to a [1mstat [22mstructure, receiving result of your
query.

The 64 bits functions must be used for large files. They have the same
syntax as the normal stat functions except that they use a [1mstat64[0m
structure.

[1mRETURN VALUE[0m
This routine returns 0 if the operation was successful or -1 if the
operation failed. In the latter case, [1mserrno [22mis set appropriately.

[1mNOTES[0m
Multiple connections using rfio_mstat are thread-safe but not process-
wide, therefore a forked child can share file descriptors opened with
rfio_mstat by its parent. Use [1mrfio_mstat_reset [22min such case.

Multiple connections behaviour is undefined if you work in a multi-
threaded environment and with threads [1mnot [22mcreated using the LCG's
[1mCthread [22minterface.

[1mERRORS[0m
[1mENOENT [22mThe named file/directory does not exist or is a null path-
name.

[1mEBADF [4m[22ms[24m is not a valid file descriptor.

[1mEACCES [22mSearch permission is denied on a component of the [4mpath[0m
prefix.

[1mEFAULT [4m[22mpath[24m or [4mstatbuf[24m is a NULL pointer.

[1mENOTDIR [22mA component of [4mpath[24m prefix is not a directory.

[1mENAMETOOLONG [22mThe length of [4mpath[24m exceeds [1mCA_MAXPATHLEN [22mor the length of
a [4mpath[24m component exceeds [1mCA_MAXNAMELEN[22m.

[1mSENOSHOST [22mHost unknown.

[1mSENOSSERV [22mService unknown.

[1mSECOMERR [22mCommunication error.

[1mSEE ALSO[0m
[1mCastor_limits(4)[22m, [1mrfio_chmod(3)[22m, [1mrfio_chown(3)[22m, [1mCthread(3)[0m

[1mAUTHOR[0m
[1mLCG Grid Deployment [22mTeam

LCG $Date: 2005/03/31 13:13:03 $ RFIO_STAT(3)

Referenced By

rfio_fstat(3), rfio_fstat64(3), rfio_lstat(3), rfio_lstat64(3), rfio_mstat(3), rfio_mstat64(3) and rfio_stat64(3) are aliases of rfio_stat(3).