Package com.mucommander.commons.file.util

Examples of com.mucommander.commons.file.util.FileSet


        AbstractFile selectedFile = tableModel.getFileAtRow(clickedRow);

        // Find out which files are to be dragged, based on the selected file and currenlty marked files.
        // If there are some files marked, drag marked files only if the selected file is one of the marked files.
        // In any other case, only drag the selected file.
        FileSet markedFiles;
        FileSet draggedFiles;
        if(tableModel.getNbMarkedFiles()>0 && (markedFiles=fileTable.getSelectedFiles()).contains(selectedFile)) {
            draggedFiles = markedFiles;
        }
        else {
            draggedFiles = new FileSet(folderPanel.getCurrentFolder(), selectedFile);
        }

        // Set initial DnDContext information
        DnDContext.setDragInitiatedByMucommander(true);
        DnDContext.setDragInitiator(folderPanel);
View Full Code Here


     * @param fileExistsAction default action to be performed when a file already exists in the destination, see {@link com.mucommander.ui.dialog.file.FileCollisionDialog} for allowed values
     * @param selectedEntries entries to be unpacked
     * @param baseArchiveDepth depth of the folder in which the top entries are located. 0 is the highest depth (archive's root folder)
     */
    public UnpackJob(ProgressDialog progressDialog, MainFrame mainFrame, AbstractArchiveFile archiveFile, int baseArchiveDepth, AbstractFile destFolder, String newName, int fileExistsAction, List<ArchiveEntry> selectedEntries) {
        super(progressDialog, mainFrame, new FileSet(archiveFile.getParent(), archiveFile), destFolder, newName, fileExistsAction);

        this.errorDialogTitle = Translator.get("unpack_dialog.error_title");
        this.baseArchiveDepth = baseArchiveDepth;
        this.selectedEntries = selectedEntries;
    }
View Full Code Here

    public boolean empty() {
        // Abort if there is no usable trash folder
        if(TRASH_FOLDER==null)
            return false;

        FileSet filesToDelete = new FileSet(TRASH_FOLDER);

        try {
            // delete real files
            filesToDelete.addAll(TRASH_FILES_SUBFOLDER.ls());
            // delete spec files
            filesToDelete.addAll(TRASH_INFO_SUBFOLDER.ls());
        } catch (java.io.IOException ex) {
          LOGGER.debug("Failed to list files", ex);
            return false;
        }

        if (filesToDelete.size() > 0) {
            // Starts deleting files
            MainFrame mainFrame = WindowManager.getCurrentMainFrame();
            ProgressDialog progressDialog = new ProgressDialog(mainFrame, Translator.get("delete_dialog.deleting"));
            DeleteJob deleteJob = new DeleteJob(progressDialog, mainFrame, filesToDelete, false);
            progressDialog.start(deleteJob);
View Full Code Here

  }

 
  public SplitFileJob(ProgressDialog progressDialog, MainFrame mainFrame,
      AbstractFile file, AbstractFile destFolder, long partSize, int parts) {
        super(progressDialog, mainFrame, new FileSet(), destFolder, null, FileCollisionDialog.ASK_ACTION);
        this.partSize = partSize;
        this.setNbFiles(parts);
        this.sourceFile = file;
        this.destFolder = destFolder;
        this.errorDialogTitle = Translator.get("split_file_dialog.error_title");
View Full Code Here

     * @param progressDialog the ProgressDialog that monitors this job
     * @param mainFrame the MainFrame this job is attached to
     * @param fileToExecute the file to copy to a temporary location and execute
     */
    public TempExecJob(ProgressDialog progressDialog, MainFrame mainFrame, AbstractFile fileToExecute) {
        this(progressDialog, mainFrame, new FileSet(fileToExecute.getParent(), fileToExecute));
    }
View Full Code Here

    }

    @Override
    public void performAction() {
        // Retrieve clipboard files
        FileSet clipboardFiles = ClipboardSupport.getClipboardFiles();
        if(clipboardFiles==null || clipboardFiles.isEmpty())
            return;

        // Start copying files
        ProgressDialog progressDialog = new ProgressDialog(mainFrame, Translator.get("copy_dialog.copying"));
        AbstractFile destFolder = mainFrame.getActivePanel().getCurrentFolder();
View Full Code Here

     * @param mainFrame the main frame
     * @param file a file to split
     * @param destFolder default destination folder
     */
    public SplitFileDialog(MainFrame mainFrame, AbstractFile file, AbstractFile destFolder) {
        super(mainFrame, ActionProperties.getActionLabel(SplitFileAction.Descriptor.ACTION_ID), new FileSet());
        this.file = file;
        this.destFolder = destFolder;
        initialize();
    }
View Full Code Here

     * @param mainFrame the MainFrame this job is attached to
     * @param fileToOpen the file to copy to a temporary location and execute
     * @param command the command used to execute the temporary file
     */
    public TempOpenWithJob(ProgressDialog progressDialog, MainFrame mainFrame, AbstractFile fileToOpen, Command command) {
        this(progressDialog, mainFrame, new FileSet(fileToOpen.getParent(), fileToOpen), command);
    }
View Full Code Here

     */
    public TempOpenWithJob(ProgressDialog progressDialog, MainFrame mainFrame, FileSet filesToOpen, Command command) {
        super(progressDialog, mainFrame, filesToOpen);
        this.command  = command;
        this.filesToOpen = filesToOpen;
        tempFiles = new FileSet(baseDestFolder);
    }
View Full Code Here

        }

        // Don't check for existing regular files, MkdirJob will take of it and popup a FileCollisionDialog
        AbstractFile destFile = resolvedDest.getDestinationFile();

        FileSet fileSet = new FileSet(destFile.getParent());
        // Job's FileSet needs to contain at least one file
        fileSet.add(destFile);

        ProgressDialog progressDialog = new ProgressDialog(mainFrame, getTitle());

        MkdirJob job;
        if(mkfileMode)
View Full Code Here

TOP

Related Classes of com.mucommander.commons.file.util.FileSet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.