/Home/aooliver/work/stagersvc/org.glite.data.lcg_gfal/src/gfal_teststat.c

Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2003 by CERN
00003  */
00004 
00005 /*
00006  * @(#)$RCSfile: gfal_teststat.c,v $ $Revision: 1.1.1.1 $ $Date: 2006/09/06 08:54:53 $ CERN Jean-Philippe Baud
00007  */
00008 
00009 #include <fcntl.h>
00010 #include <stdio.h>
00011 #include "gfal_api.h"
00012 
00013 main(int argc, char **argv)
00014 {
00015         struct stat statbuf;
00016 
00017         if (argc != 2) {
00018                 fprintf (stderr, "usage: %s filename\n", argv[0]);
00019                 exit (1);
00020         }
00021         if (gfal_stat (argv[1], &statbuf) < 0) {
00022                 perror ("gfal_stat");
00023                 exit (1);
00024         }
00025         printf ("stat successful\n");
00026         printf ("mode = %o\n", statbuf.st_mode);
00027         printf ("nlink = %d\n", statbuf.st_nlink);
00028         printf ("uid = %d\n", statbuf.st_uid);
00029         printf ("gid = %d\n", statbuf.st_gid);
00030         printf ("size = %ld\n", statbuf.st_size);
00031         exit (0);
00032 }

Generated on Fri Sep 8 20:20:47 2006 for GFAL by  doxygen 1.4.6