lfc_stat man page

LFC_STAT(3)                  LFC Library Functions                 LFC_STAT(3)

      lfc_stat  -  get  information about a LFC file or directory in the name

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

      [1mint lfc_lstat (const char *[4m[22mpath[24m[1m, struct lfc_filestat *[4m[22mstatbuf[24m[1m)[0m

      [1mint lfc_stat (const char *[4m[22mpath[24m[1m, struct lfc_filestat *[4m[22mstatbuf[24m[1m)[0m

      [1mint lfc_statx (const  char  *[4m[22mpath[24m[1m,  struct  lfc_fileid  *[4m[22mfile_uniqueid[24m[1m,[0m
      [1mstruct lfc_filestat *[4m[22mstatbuf[24m[1m)[0m

      [1mlfc_stat  [22mgets  information  about  a LFC file or directory in the name

      [1mlfc_lstat  [22mis  identical  to  [1mlfc_stat  [22mexcept  for   symbolic   links.
      [1mlfc_lstat  [22mretrieves  information about the link itself, while [1mlfc_stat[0m
      gets information about the file/directory referenced  by  the  symbolic

      [1mlfc_statx  [22mreturns  the  same information plus the file unique id (name
      server hostname and file id).  The file can be specified by  [4mpath[24m  name
      or by [4mfile_uniqueid[24m.  If both are given, [4mfile_uniqueid[24m is used.

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

      The structure pointed to by [4mstatbuf[24m contains the following members:
             u_signed64     fileid;        /* entry unique identifier */
             mode_t         filemode; /* see below */
             int       nlink;         /* number of files in a directory */
             uid_t          uid;
             gid_t          gid;
             u_signed64     filesize;
             time_t         atime;         /* last access to file */
             time_t         mtime;         /* last file modification */
             time_t         ctime;         /* last metadata modification */
             short          fileclass;          /*  1-->  experiment,  2  -->
             user */
             char      status;        /* '-' --> online, 'm' --> migrated */

      filemode  is  constructed  by  OR'ing  the bits defined in <[1msys/stat.h[22m>
      under Unix or  [1m"statbits.h" [22munder Windows/NT:

             [1mS_IFLNK   0xA000          [22msymbolic link
             [1mS_IFREG   0x8000          [22mregular file
             [1mS_IFDIR   0x4000          [22mdirectory
             [1mS_ISUID   0004000         [22mset user ID on execution
             [1mS_ISGID   0002000         [22mset group ID on execution
             [1mS_ISVTX   0001000         [22msticky bit
             [1mS_IRUSR   0000400         [22mread by owner
             [1mS_IWUSR   0000200         [22mwrite by owner
             [1mS_IXUSR   0000100         [22mexecute/search by owner
             [1mS_IRGRP   0000040         [22mread by group
             [1mS_IWGRP   0000020         [22mwrite by group
             [1mS_IXGRP   0000010         [22mexecute/search by group
             [1mS_IROTH   0000004         [22mread by others
             [1mS_IWOTH   0000002         [22mwrite by others
             [1mS_IXOTH   0000001         [22mexecute/search by others

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

      [1mENOENT       [22mThe named file/directory does not exist or is a null path-

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

      [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.

      [1mENSNACT      [22mName server is not running or is being shutdown.

[1mSEE ALSO[0m
      [1mCastor_limits(4)[22m, [1mlfc_chdir(3)[22m,  [1mlfc_chmod(3)[22m,  [1mlfc_chown(3)[22m,  [1mlfc_cre-[0m

      [1mLCG Grid Deployment [22mTeam

LFC                      $Date: 2003/09/02 07:08:38 $              LFC_STAT(3)

Referenced By

lfc_lstat(3) is an alias of lfc_stat(3).