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

#include <fcntl.h>
#include <stdio.h>
#include "gfal_api.h"

Go to the source code of this file.

Functions

 main (int argc, char **argv)


Function Documentation

main int  argc,
char **  argv
 

Definition at line 13 of file gfal_teststat.c.

References gfal_stat().

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:48 2006 for GFAL by  doxygen 1.4.6