com.mucommander.job
Class MkdirJob

java.lang.Object
  extended by com.mucommander.job.FileJob
      extended by com.mucommander.job.MkdirJob
All Implemented Interfaces:
java.lang.Runnable

public class MkdirJob
extends FileJob

This FileJob creates a new file or directory.

Author:
Maxence Bernard

Field Summary
 
Fields inherited from class com.mucommander.job.FileJob
APPEND_ACTION, APPEND_TEXT, baseSourceFolder, CANCEL_ACTION, CANCEL_TEXT, currentFile, currentFileIndex, currentFilename, files, FINISHED, INTERRUPTED, mainFrame, nbFiles, NOT_STARTED, PAUSED, progressDialog, RETRY_ACTION, RETRY_TEXT, RUNNING, SKIP_ACTION, SKIP_TEXT
 
Constructor Summary
MkdirJob(ProgressDialog progressDialog, MainFrame mainFrame, FileSet fileSet)
          Creates a new MkdirJob which operates in 'mkdir' mode.
MkdirJob(ProgressDialog progressDialog, MainFrame mainFrame, FileSet fileSet, long allocateSpace)
          Creates a new MkdirJob which operates in 'mkfile' mode.
 
Method Summary
 java.lang.String getStatusString()
          Returns a String describing what the job is currently doing.
protected  boolean hasFolderChanged(AbstractFile folder)
          Folders only needs to be refreshed if it is the destination folder
protected  boolean processFile(AbstractFile file, java.lang.Object recurseParams)
          Creates the new directory in the destination folder.
 
Methods inherited from class com.mucommander.job.FileJob
addFileJobListener, getCurrentFileIndex, getCurrentFilename, getEffectiveJobTime, getEndDate, getNbFiles, getPausedTime, getPauseStartDate, getStartDate, getState, getTotalPercentDone, interrupt, jobCompleted, jobPaused, jobResumed, jobStarted, jobStopped, nextFile, refreshTables, removeFileJobListener, run, selectFileWhenFinished, setAutoUnmark, setPaused, setState, showErrorDialog, showErrorDialog, start, waitForUserResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MkdirJob

public MkdirJob(ProgressDialog progressDialog,
                MainFrame mainFrame,
                FileSet fileSet)
Creates a new MkdirJob which operates in 'mkdir' mode.


MkdirJob

public MkdirJob(ProgressDialog progressDialog,
                MainFrame mainFrame,
                FileSet fileSet,
                long allocateSpace)
Creates a new MkdirJob which operates in 'mkfile' mode.

Parameters:
allocateSpace - number of bytes to allocate to the file, -1 for none (use AbstractFile#mkfile())
Method Detail

processFile

protected boolean processFile(AbstractFile file,
                              java.lang.Object recurseParams)
Creates the new directory in the destination folder.

Specified by:
processFile in class FileJob
Parameters:
file - the file or folder to process
recurseParams - array of parameters which can be used when calling this method recursively, contains null when called by FileJob.run()
Returns:
true if the operation was sucessful

hasFolderChanged

protected boolean hasFolderChanged(AbstractFile folder)
Folders only needs to be refreshed if it is the destination folder

Specified by:
hasFolderChanged in class FileJob
Parameters:
folder - the folder to test
Returns:
true if the given folder has or may have been modified by this job

getStatusString

public java.lang.String getStatusString()
Description copied from class: FileJob
Returns a String describing what the job is currently doing. This default implementation returns Processing CURRENT_FILE where CURRENT_FILE is the name of the file currently being processed. This method should be overridden to provide a more accurate description.

Overrides:
getStatusString in class FileJob
Returns:
a String describing what the job is currently doing


This file is part of muCommander - Copyright (C) 2002-2008 Maxence Bernard