corelib.io.files
Class Folder

java.lang.Object
  extended by java.io.File
      extended by corelib.io.files.File
          extended by corelib.io.files.Folder
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<java.io.File>

public class Folder
extends File

This class defines the concept of folder on hard disk.

Since:
0.4
Author:
Dominique Liard
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.io.File
pathSeparator, pathSeparatorChar, separator, separatorChar
 
Constructor Summary
Folder(java.lang.String folderName)
          Class construction that accept the name of the folder.
 
Method Summary
 void copyInto(Folder sourceFolder, boolean overwrite)
          Copy the specified folder, in first parameter, into this folder.
 
Methods inherited from class java.io.File
canExecute, canRead, canWrite, compareTo, createNewFile, createTempFile, createTempFile, delete, deleteOnExit, equals, exists, getAbsoluteFile, getAbsolutePath, getCanonicalFile, getCanonicalPath, getFreeSpace, getName, getParent, getParentFile, getPath, getTotalSpace, getUsableSpace, hashCode, isAbsolute, isDirectory, isFile, isHidden, lastModified, length, list, list, listFiles, listFiles, listFiles, listRoots, mkdir, mkdirs, renameTo, setExecutable, setExecutable, setLastModified, setReadable, setReadable, setReadOnly, setWritable, setWritable, toString, toURI, toURL
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Folder

public Folder(java.lang.String folderName)
       throws NotFolderException
Class construction that accept the name of the folder. Caution: the folder must already exist on the disk. To create a new folder you must call the FileSystem.mkdir or FileSystem.mkdirs methods.

Parameters:
folderName - The name of the considered folder.
Throws:
NotFolderException - Thrown if folderName not references an existing folder on disk.
See Also:
FileSystem.mkdir(java.lang.String), FileSystem.mkdirs(java.lang.String)
Method Detail

copyInto

public void copyInto(Folder sourceFolder,
                     boolean overwrite)
              throws java.io.IOException
Copy the specified folder, in first parameter, into this folder. The copy is recursive and IOException can be thrown if copied files exists into this folder, depending of the second method parameter.

Parameters:
sourceFolder - The folder to copy in this folder.
overwrite - Allows, or not, file replacement.
Throws:
java.io.IOException - Thrown if copy cannot be performed, according the value of the overwrite parameter.


CAUTION: Ellipse is proposed to you in BETA version to allow evaluation of this framework. Infini Software is released from any responsibility for the use of Ellipse Framework.

Copyright 2012 Infini Software - All Rights Reserved.