1 #ifndef __bbstdFilesFromDirectory_h_INCLUDED__
2 #define __bbstdFilesFromDirectory_h_INCLUDED__
3 #include "bbtkAtomicBlackBox.h"
5 #include "bbstd_EXPORT.h"
10 class bbstd_EXPORT FilesFromDirectory
12 public bbtk::AtomicBlackBox
14 BBTK_BLACK_BOX_INTERFACE(FilesFromDirectory,bbtk::AtomicBlackBox);
15 BBTK_DECLARE_INPUT(In,std::string);
16 BBTK_DECLARE_INPUT(Recursive,bool);
17 BBTK_DECLARE_OUTPUT(Out,std::vector<std::string>);
18 BBTK_PROCESS(Process);
22 std::string NormalizePath(std::string const &pathname);
23 int Explore(std::string const &dirpath, bool recursive);
25 /// List of file names
26 std::vector<std::string> Filenames;
27 /// name of the root directory to explore
31 //=================================================================
32 // BlackBox description
33 BBTK_BEGIN_DESCRIBE_BLACK_BOX(FilesFromDirectory,bbtk::AtomicBlackBox);
34 BBTK_NAME("FilesFromDirectory");
35 BBTK_AUTHOR("jpr@creatis.univ-lyon1.fr");
36 BBTK_DESCRIPTION("returns the fullPathNames of the files in a Directory");
38 BBTK_INPUT(FilesFromDirectory,In,"Directory Name",std::string,"");
39 BBTK_INPUT(FilesFromDirectory,Recursive,"Recursive directory exploration",bool,"");
41 BBTK_OUTPUT(FilesFromDirectory,Out,"FullPathNames of the files",std::vector<std::string>,"");
42 BBTK_END_DESCRIBE_BLACK_BOX(FilesFromDirectory);
47 #endif // __bbstdFilesFromDirectory_h_INCLUDED__