@Override public boolean includeFile( FileSelectInfo fileSelectInfo ) throws Exception { return fileSelectInfo.getFile().toString().matches( regex ); } } );
public boolean includeFile( FileSelectInfo info ) { boolean returncode = false; try { if ( !info.getFile().toString().equals( sourceFolder ) ) { // Pass over the Base folder itself String short_filename = info.getFile().getName().getBaseName(); if ( info.getFile().getParent().equals( info.getBaseFolder() ) || ( !info.getFile().getParent().equals( info.getBaseFolder() ) && includeSubfolders ) ) { if ( ( info.getFile().getType() == FileType.FILE && fileWildcard == null ) || ( info.getFile().getType() == FileType.FILE && fileWildcard != null && GetFileWildcard( short_filename, fileWildcard ) ) ) { returncode = true; } } } } catch ( Exception e ) { logError( "Error while finding files ... in [" + info.getFile().toString() + "]. Exception :" + e.getMessage() ); returncode = false; } return returncode; }
@Override public boolean traverseDescendents( FileSelectInfo info ) { return info.getDepth() == 0 || subdirs; }
@Override public boolean traverseDescendents( FileSelectInfo info ) { return info.getDepth() == 0 || subdirs; }
@Override public boolean includeFile( FileSelectInfo fileSelectInfo ) throws Exception { FileObject file = fileSelectInfo.getFile(); return file.isFile() && file.toString().endsWith( ".jar" ); } } );
@Override public boolean includeFile( FileSelectInfo info ) { // Never return the parent directory of a file list. if ( info.getDepth() == 0 ) { return false; } FileObject fileObject = info.getFile(); try { if ( fileObject != null && filter.isFileTypeAllowed( fileObject.getType() ) ) { return true; } return false; } catch ( IOException ex ) { // Upon error don't process the file. return false; } } } );
public boolean includeFile( FileSelectInfo info ) { boolean returncode = false; try { if ( !info.getFile().toString().equals( sourceFolder ) ) { // Pass over the Base folder itself String short_filename = info.getFile().getName().getBaseName(); if ( info.getFile().getParent().equals( info.getBaseFolder() ) || ( ( !info.getFile().getParent().equals( info.getBaseFolder() ) && meta.isIncludeSubFolders() ) ) ) { if ( ( info.getFile().getType() == FileType.FILE && fileWildcard == null ) || ( info.getFile().getType() == FileType.FILE && fileWildcard != null && GetFileWildcard( short_filename, fileWildcard ) ) ) { returncode = true; } } } } catch ( Exception e ) { logError( BaseMessages.getString( PKG, "Mail.Error.FindingFiles", info.getFile().toString(), e .getMessage() ) ); returncode = false; } return returncode; }
public boolean traverseDescendents( FileSelectInfo info ) { return info.getDepth() == 0 || includeSubfolders; } }
public boolean includeFile( FileSelectInfo info ) { FileObject fileObject = info.getFile(); try { if ( fileObject == null ) { return false; } } catch ( Exception ex ) { // Upon error don't process the file. return false; } finally { if ( fileObject != null ) { try { fileObject.close(); fileObject = null; } catch ( IOException ex ) { /* Ignore */ } } } return true; } } );
@Override public boolean includeFile( FileSelectInfo info ) { // Never return the parent directory of a file list. if ( info.getDepth() == 0 ) { return false; } FileObject fileObject = info.getFile(); try { if ( fileObject != null && filter.isFileTypeAllowed( fileObject.getType() ) ) { String name = info.getFile().getName().getBaseName(); boolean matches = true; if ( !Utils.isEmpty( onemask ) ) { matches = Pattern.matches( onemask, name ); } boolean excludematches = false; if ( !Utils.isEmpty( excludeonemask ) ) { excludematches = Pattern.matches( excludeonemask, name ); } return ( matches && !excludematches ); } return false; } catch ( IOException ex ) { // Upon error don't process the file. return false; } } } );
public boolean includeFile( FileSelectInfo info ) { boolean returncode = false; try { if ( !info.getFile().toString().equals( source_folder ) ) { String short_filename = info.getFile().getName().getBaseName(); if ( info.getFile().getParent().equals( info.getBaseFolder() ) ) { if ( ( info.getFile().getType() == FileType.FILE && compareonly.equals( "only_files" ) ) || ( info.getFile().getType() == FileType.FOLDER && compareonly.equals( "only_folders" ) ) || ( GetFileWildcard( short_filename ) && compareonly.equals( "specify" ) ) || ( compareonly.equals( "all" ) ) ) { if ( ( info.getFile().getType() == FileType.FILE && compareonly.equals( "only_files" ) ) || ( info.getFile().getType() == FileType.FOLDER && compareonly.equals( "only_folders" ) ) || ( GetFileWildcard( short_filename ) && compareonly.equals( "specify" ) ) || ( compareonly.equals( "all" ) ) ) { + info.getFile().toString() + "]. Exception :" + e.getMessage() ); returncode = false;
public boolean traverseDescendents( FileSelectInfo info ) { return info.getDepth() == 0 || include_subfolders; }
public boolean includeFile( FileSelectInfo info ) { FileObject fileObject = info.getFile(); try { if ( fileObject == null ) { return false; } } catch ( Exception ex ) { // Upon error don't process the file. return false; } finally { if ( fileObject != null ) { try { fileObject.close(); } catch ( IOException ex ) { /* Ignore */ } } } return true; } } );
try { if ( !info.getFile().toString().equals( sourceFolder ) && !parentjob.isStopped() ) { String shortFilename = info.getFile().getName().getBaseName(); if ( !info.getFile().getParent().equals( info.getBaseFolder() ) ) { && ( info.getFile().getType() == FileType.FILE ) && GetFileWildcard( shortFilename, fileWildcard ) ) { if ( log.isDetailed() ) { logDetailed( BaseMessages.getString( PKG, "JobEntryDeleteFiles.DeletingFile", info .getFile().toString() ) ); if ( ( info.getFile().getType() == FileType.FILE ) && GetFileWildcard( shortFilename, fileWildcard ) ) { if ( log.isDetailed() ) { logDetailed( BaseMessages.getString( PKG, "JobEntryDeleteFiles.DeletingFile", info .getFile().toString() ) ); log.logError( BaseMessages.getString( PKG, "JobDeleteFiles.Error.Exception.DeleteProcessError" ), BaseMessages .getString( PKG, "JobDeleteFiles.Error.Exception.DeleteProcess", info.getFile().toString(), e .getMessage() ) );
public boolean traverseDescendents( FileSelectInfo info ) { return info.getDepth() == 0 || include_subfolders; }
public boolean includeFile( FileSelectInfo info ) { FileObject fileObject = info.getFile(); try { if ( fileObject == null ) { return false; } } catch ( Exception ex ) { // Upon error don't process the file. return false; } finally { if ( fileObject != null ) { try { fileObject.close(); fileObject = null; } catch ( IOException ex ) { /* Ignore */ } } } return true; } } );
@Override public boolean traverseDescendents(FileSelectInfo fileInfo) throws Exception { if (fileInfo.getFile().getType() == FileType.FOLDER && fileInfo.getDepth() == 0) { return true; } else if (this.directoryFilter != null) { return this.directoryFilter.accept(fileInfo); } else { return this.traverseDescendents; } } }
try { if ( !info.getFile().toString().equals( sourceFolder ) ) { String short_filename = info.getFile().getName().getBaseName(); if ( !info.getFile().getParent().equals( info.getBaseFolder() ) ) { && ( info.getFile().getType() == FileType.FILE ) && GetFileWildcard( short_filename, fileWildcard ) ) { if ( isDetailed() ) { logDetailed( BaseMessages.getString( PKG, "JobEntryCheckFilesLocked.CheckingFile", info .getFile().toString() ) ); if ( ( info.getFile().getType() == FileType.FILE ) && GetFileWildcard( short_filename, fileWildcard ) ) { if ( isDetailed() ) { logDetailed( BaseMessages.getString( PKG, "JobEntryCheckFilesLocked.CheckingFile", info .getFile().toString() ) ); .getString( PKG, "JobCheckFilesLocked.Error.Exception.Process", info.getFile().toString(), e .getMessage() ) ); returncode = false;