public static boolean isAcceptedVuzeFileName( File file ) { return( isAcceptedVuzeFileName( file.getName())); }
public static String getVuzeFileName( String name ) { if ( isAcceptedVuzeFileName(name)){ // remove existing acceptable suffix int pos = name.lastIndexOf( "." ); if ( pos >= 0 ){ name = name.substring(0, pos ); } } return( name + getVuzeFileSuffix()); }
@Override public FilePluginInstaller installFromFile( File file ) throws PluginException { if ( VuzeFileHandler.isAcceptedVuzeFileName( file )){ file = extractFromVuzeFile( file ); } return( new FilePluginInstallerImpl(this,file)); }
if ( VuzeFileHandler.isAcceptedVuzeFileName( name )){
if ( name.endsWith( ".torrent" ) || VuzeFileHandler.isAcceptedVuzeFileName( name )){
protected void exportCustomization( CustomizationImpl cust, File to_file ) throws CustomizationException { if ( to_file.isDirectory()){ to_file = new File( to_file, VuzeFileHandler.getVuzeFileName( cust.getName() + "_" + cust.getVersion())); } if ( !VuzeFileHandler.isAcceptedVuzeFileName( to_file.getName())){ to_file = new File( to_file.getParentFile(), VuzeFileHandler.getVuzeFileName( to_file.getName())); } try{ Map contents = new HashMap(); byte[] data = FileUtil.readFileAsByteArray( cust.getContents()); contents.put( "name", cust.getName()); contents.put( "version", cust.getVersion()); contents.put( "data", data ); VuzeFile vf = VuzeFileHandler.getSingleton().create(); vf.addComponent( VuzeFileComponent.COMP_TYPE_CUSTOMIZATION, contents); vf.write( to_file ); }catch( Throwable e ){ throw( new CustomizationException( "Failed to export customization", e )); } }
if ( !VuzeFileHandler.isAcceptedVuzeFileName( f )){
if (VuzeFileHandler.isAcceptedVuzeFileName( url )) { new AEThread2("VuzeLoader") { @Override
if ( !VuzeFileHandler.isAcceptedVuzeFileName( path )){
if ( VuzeFileHandler.isAcceptedVuzeFileName( filename )){
|| VuzeFileHandler.isAcceptedVuzeFileName(event_location));
@Override public void runSupport() { FileDialog dialog = new FileDialog( shell, SWT.SYSTEM_MODAL | SWT.SAVE ); dialog.setFilterPath( TorrentOpener.getFilterPathData() ); dialog.setText(MessageText.getString("metasearch.export.select.template.file")); dialog.setFilterExtensions(VuzeFileHandler.getVuzeFileFilterExtensions()); dialog.setFilterNames(VuzeFileHandler.getVuzeFileFilterExtensions()); String path = TorrentOpener.setFilterPathData( dialog.open()); if ( path != null ){ if ( !VuzeFileHandler.isAcceptedVuzeFileName( path )){ path = VuzeFileHandler.getVuzeFileName( path ); } try{ MetaSearchManagerFactory.getSingleton().getMetaSearch().exportEngines( new File( path )); }catch( Throwable e ){ Debug.out( e ); } } } });
@Override public void runSupport() { FileDialog dialog = new FileDialog( Utils.findAnyShell(), SWT.SYSTEM_MODAL | SWT.SAVE ); dialog.setFilterPath( TorrentOpener.getFilterPathData() ); dialog.setText(MessageText.getString("subscript.export.select.template.file")); dialog.setFilterExtensions(VuzeFileHandler.getVuzeFileFilterExtensions()); dialog.setFilterNames(VuzeFileHandler.getVuzeFileFilterExtensions()); String path = TorrentOpener.setFilterPathData( dialog.open()); if ( path != null ){ if ( !VuzeFileHandler.isAcceptedVuzeFileName( path )){ path = VuzeFileHandler.getVuzeFileName( path ); } try{ VuzeFile vf = subs.getVuzeFile(); vf.write( new File( path )); }catch( Throwable e ){ Debug.out( e ); } } } });
@Override public void runSupport() { FileDialog dialog = new FileDialog( Utils.findAnyShell(), SWT.SYSTEM_MODAL | SWT.SAVE ); dialog.setFilterPath( TorrentOpener.getFilterPathData() ); dialog.setText(MessageText.getString("device.export.select.template.file")); dialog.setFilterExtensions( VuzeFileHandler.getVuzeFileFilterExtensions()); dialog.setFilterNames( VuzeFileHandler.getVuzeFileFilterExtensions()); String path = TorrentOpener.setFilterPathData( dialog.open()); if ( path != null ){ if ( !VuzeFileHandler.isAcceptedVuzeFileName( path )){ path = VuzeFileHandler.getVuzeFileName( path ); } try{ VuzeFile vf = device.getVuzeFile(); vf.write( new File( path )); }catch( Throwable e ){ Debug.out( e ); } } } });
@Override public void runSupport() { FileDialog dialog = new FileDialog( Utils.findAnyShell(), SWT.SYSTEM_MODAL | SWT.SAVE ); dialog.setFilterPath( TorrentOpener.getFilterPathData() ); dialog.setText(MessageText.getString("tag.export.select.template.file")); dialog.setFilterExtensions(VuzeFileHandler.getVuzeFileFilterExtensions()); dialog.setFilterNames(VuzeFileHandler.getVuzeFileFilterExtensions()); String path = TorrentOpener.setFilterPathData( dialog.open()); if ( path != null ){ if ( !VuzeFileHandler.isAcceptedVuzeFileName( path )){ path = VuzeFileHandler.getVuzeFileName( path ); } try{ VuzeFile vf = TagManagerFactory.getTagManager().exportTags( tags ); vf.write( new File( path )); }catch( Throwable e ){ Debug.out( e ); } } } });