minicopier
Class Copier
java.lang.Object
minicopier.Copier
public class Copier
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
name
public static java.lang.String name
version
public static java.lang.String version
mainQueue
public static MainQueue mainQueue
failedItems
public static FailedQueue failedItems
Copier
public Copier()
add2basket
public void add2basket(java.lang.String path)
getCurrentFileSource
public java.lang.String getCurrentFileSource()
getCurrentFileDestination
public java.lang.String getCurrentFileDestination()
setGui
public void setGui(MainFrame view)
setPause
public void setPause(boolean b)
getPause
public boolean getPause()
getBusy
public boolean getBusy()
skip
public void skip(boolean b)
addURIString2basket
public void addURIString2basket(java.lang.String uriString)
paste2URIString
public void paste2URIString(java.lang.String uriString)
stringURI2StringPath
public java.lang.String stringURI2StringPath(java.lang.String uriString)
addFile2Queue
public void addFile2Queue(FileToTransfer file)
addFolder2Queue
public void addFolder2Queue(java.io.File parentFolder,
java.lang.String destinationFolder)
paste
public void paste(java.lang.String destinationPath)
- Transforms basket items into FileToTransfer (even directories
content) and transfer them to the main queue.
- Parameters:
destinationPath
- The path to the directory in which basket
items must be copied.
forceStart
public void forceStart()
treatQueue
public void treatQueue()
increaseQueueTotalSize
public void increaseQueueTotalSize(long nb)
decreaseQueueTotalSize
public void decreaseQueueTotalSize(long nb)
readAndInitBytesCounter
public long readAndInitBytesCounter()
increaseQueueCurrentSize
public void increaseQueueCurrentSize(long nb)
decreaseQueueCurrentSize
public void decreaseQueueCurrentSize(long nb)
setFileCurrentSize
public void setFileCurrentSize(long s)
increaseFileCurrentSize
public void increaseFileCurrentSize(long nb)
setFileTotalSize
public void setFileTotalSize(long s)
getTotalBytesRemaining
public long getTotalBytesRemaining()
getCurrentBytesRemaining
public long getCurrentBytesRemaining()
getTotalPercent
public int getTotalPercent()
getCurrentPercent
public int getCurrentPercent()
getQueueTotalSize
public long getQueueTotalSize()
getFileTotalSize
public long getFileTotalSize()
pause
public boolean pause()
unpause
public void unpause()
basketLength
public int basketLength()
clearBasket
public void clearBasket()
nameIsAcceptable
public boolean nameIsAcceptable(java.lang.String fileName,
java.lang.String dirPath)
- Depending on platform, some characters in file's name are
forbidden. So we just create a temp file and try to rename
it to know if the name is accepted by the host OS.
- Parameters:
fileName
- new name the user wants to usedirPath
- the destination directory path
isNotLink
public static boolean isNotLink(java.io.File file)
main
public static void main(java.lang.String[] args)
- Parameters:
args
-