35 #include <boost/filesystem.hpp>
36 namespace bfs=boost::filesystem;
49 m_pFileManager = NULL;
50 m_CompletePath =
moText(
"");
109 for(
int i=0; i<(int)
m_Files.Count(); i++) {
121 if( bfs::exists( path ) )
125 bfs::directory_iterator end ;
126 for( bfs::directory_iterator iter(path) ; iter != end ; ++iter )
127 if ( bfs::is_directory( *iter ) )
133 moText pFileName( iter->path().file_string().c_str() );
135 moText pCompletePathFilename;
138 pCompletePathFilename = pFileName;
144 pFile =
new moFile( pCompletePathFilename );
269 for(
int i=0; i<(int)
m_Files.Count(); i++) {
395 m_CompletePath =
moText(
"");
400 m_pBucketsPool = NULL;
419 if (m_bRemote && !m_pBucketsPool) {
423 return (m_pBucketsPool!=NULL);
428 if (m_bRemote && m_pBucketsPool) {
429 delete m_pBucketsPool;
430 m_pBucketsPool = NULL;
432 return (m_pBucketsPool==NULL);
437 m_bExists = bfs::exists((
char*)m_CompletePath);
472 m_FileType = p_filetype;
485 m_CompletePath = p_completepath;
487 moText Left7 = m_CompletePath;
489 moText Left6 = m_CompletePath;
492 if (Left7==
moText(
"http://") ||
493 Left7==
moText(
"HTTP://")) {
494 m_Protocol =
moText(
"http://");
498 }
else if (Left6==
moText(
"ftp://") ||
499 Left6==
moText(
"FTP://")) {
500 m_Protocol =
moText(
"ftp://");
505 moTextArray FileNameA;
506 m_Protocol =
moText(
"file:///");
510 str = bfs::extension( (
char*)m_CompletePath );
512 m_Extension = str.c_str();
516 if ( m_Dirs.Count() > 0 ) {
518 m_FileName = m_Dirs[m_Dirs.Count()-1];
520 m_FileName = FileNameA[0];
526 m_bExists = bfs::exists((
char*)m_CompletePath);
539 return m_CompletePath;
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
moFile * GetFile(moText p_FileName)
moTextArray Explode(char *separator) const
virtual MOboolean Init()
Inicializa el objeto.
void SetType(moFileType p_filetype)
virtual MOboolean Init()
Inicializa el objeto.
moFile * Find(MOint index)
moText GetExtension()
Get absolute path and filename "/D/PP/myFileName.txt".
void SetCompletePath(moText p_completepath)
clase de para manejar textos
moText GetPath()
Retreive full file name: return "myFileName.txt", extension is included.
moFileManager * m_pFileManager
virtual MOboolean Finish()
Finaliza el objeto, libera recursos.
Administrador de moBucket 's.
moText GetCompletePath()
Get inmediate folder name: return "PP" for "PP/myFileName.txt".
static moDebug * MODebug2
Clase de impresión de errores para depuración
moText GetProtocol()
Get extension ".txt".
void Message(moText p_text)
Anuncia un mensaje al usuario además de guardarlo en el log de texto.
MOboolean Open(moText p_CompletePath, moText p_Search="/*.*")
moDefineDynamicArray(moFileArray) moDefineDynamicArray(moDirectoryArray) moDirectory