lfc_delfilesbypattern man page


      lfc_delfilesbypattern  -  delete  the  file entries selected by pattern
      matching on basename

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

      [1mint lfc_delfilesbypattern (const char *[4m[22mpath[24m[1m, const char  *[4m[22mpattern[24m[1m,  int[0m
      [4mforce[24m[1m, int *[4m[22mnbstatuses[24m[1m, struct lfc_filestatus **[4m[22mstatuses[24m[1m)[0m

      [1mlfc_delfilesbypattern  [22mdeletes  the  file  entries  selected by pattern
      matching on basename. If replicas exist and the force argument  is  not
      zero, all replicas are first removed.

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

             allows to restrict the list of files to be  deleted  to  entries
             having  the basename starting with this pattern.  [4mpattern[24m should
             be terminated by a %.

             will be set to the number of replies in the array of statuses.

             will be set to the address of an array of lfc_filestatus  struc-
             tures  allocated by the API. The client application is responsi-
             ble for freeing the array when not needed anymore.

      struct lfc_filestatus {
           char      name[CA_MAXNAMELEN+1];
           int       errcode;

      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 directory does not exist.

      [1mEACCES       [22mSearch  permission  is  denied  on a component of the [4mpath[0m
                   prefix or write permission is denied on the parent  direc-
                   tory or the parent has the sticky bit S_ISVTX set and

                     the  effective  user  ID of the requestor does not match
                     the owner ID of the file and

                     the effective user ID of the requestor  does  not  match
                     the owner ID of the directory and

                     the file is not writable by the requestor and

                     the  requestor does not have ADMIN privilege in the Cupv

      [1mENOMEM       [22mMemory could not be allocated for marshalling the  request
                   or unmarshalling the reply.

      [1mEFAULT       [4m[22mpath[24m, [4mpattern[24m, [4mnbstatuses[24m or [4mstatuses[24m is a NULL pointer.

      [1mEEXIST       [22mFile has replicas and [4mforce[24m is zero.

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

      [1mEINVAL       [22mThe length of [4mpattern[24m exceeds [1mCA_MAXNAMELEN[22m.

      [1mSENOSSERV    [22mService unknown.

      [1mSEINTERNAL   [22mDatabase error.

      [1mSECOMERR     [22mCommunication error.

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

[1mSEE ALSO[0m
      [1mCastor_limits(4)[22m, [1mlfc_delreplica(3)[22m, [1mlfc_unlink(3)[0m

      [1mLCG Grid Deployment [22mTeam

LFC                      $Date: 2007/12/13 11:59:47 $ LFC_DELFILESBYPATTERN(3)