Back to index

nordugrid-arc-nox  1.1.0~rc6
delete.h
Go to the documentation of this file.
00001 #ifndef __ARC_GM_DELETE_H__
00002 #define __ARC_GM_DELETE_H__
00003 #include <string>
00004 #include <list>
00005 #include "../files/info_types.h"
00006 
00007 /*
00008   Delete all files and subdirectories in 'dir_base' which are or are not
00009   present in 'files' list.
00010   Accepts:
00011     dir_base - path to directory.
00012     files - list of files to delete/keep. Paths are relative to 'dir_base'.
00013     excl - if set to true all files excluding those in 'files' will be
00014       deleted. Otherwise - only 'files' will be deleted. If some of 
00015       'files' correspond to directories - whole directory will be
00016       deleted.
00017     lfn_exs, lfn_mis - if both set to true, whole 'files' list is
00018       used. If only one is true, then only entries of 'files' with
00019       lfn information available/not available will be used.
00020 */
00021 int delete_all_files(const std::string &dir_base,const std::list<FileData> &files,
00022                      bool excl,bool lfn_exs = true,bool lfn_mis = true);
00023 /*
00024   Delete all soft-links available in tree.
00025 */
00026 int delete_all_links(const std::string &dir_base,const std::list<FileData> &files);
00027 
00028 #endif