gfal_testcreatedir.c

This example show how to create a directory ex : use case with SRM plugin : ./gfal_testdir srm://grid05.lal.in2p3.fr:8446/dpm/lal.in2p3.fr/home/dteam/test_tatooin

00001 
00005 #include <stdio.h>
00006 #include <stdlib.h>
00007 #include "gfal_api.h"
00008 
00009 int main(int argc, char **argv)
00010 {
00011         char *rootdir;
00012 
00013         if (argc != 2) {
00014                 fprintf (stderr, "usage: %s rootdir rights \n", argv[0]);
00015                 exit (1);
00016         }
00017 
00018         rootdir = argv[1];
00019 
00020         printf ("Creating directory %s ...\n", rootdir);
00021         if (gfal_mkdir (rootdir, 0777) < 0) {
00022                 gfal_posix_check_error();
00023                 exit (1);
00024         }
00025 
00026 
00027 
00028         printf ("All is ok.\n");
00029         exit (0);
00030 }

Generated on 15 Dec 2014 for GFAL2 by  doxygen 1.4.7