Author: niallp Date: Thu Sep 21 21:14:48 2006 New Revision: 448799 URL: http://svn.apache.org/viewvc?view=rev&rev=448799 Log: javadoc changes - mostly checkstyle
Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileDeleteStrategy.java jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileSystemUtils.java jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java?view=diff&rev=448799&r1=448798&r2=448799 ============================================================================== --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/DirectoryWalker.java Thu Sep 21 21:14:48 2006 @@ -28,7 +28,9 @@ * limit the files and direcories visited. * Commons IO supplies many common filter implementations in the * <a href="filefilter/package-summary.html"> filefilter</a> package. - * <p> + * + * <h3>Example Implementation</h3> + * * There are many possible extensions, for example, to delete all * files and '.svn' directories, and return a list of deleted files: * <pre> @@ -61,6 +63,35 @@ * results.add(file); * } * } + * </pre> + * + * <h3>Filter Example</h3> + * + * If you wanted all directories which are not hidden + * and files which end in ".txt" - you could build a composite filter + * using the filter implementations in the Commons IO + * <a href="filefilter/package-summary.html">filefilter</a> package + * in the following way: + * + * <pre> + * + * // Create a filter for Non-hidden directories + * IOFileFilter fooDirFilter = + * FileFilterUtils.andFileFilter(FileFilterUtils.directoryFileFilter, + * HiddenFileFilter.VISIBLE); + * + * // Create a filter for Files ending in ".txt" + * IOFileFilter fooFileFilter = + * FileFilterUtils.andFileFilter(FileFilterUtils.fileFileFilter, + * FileFilterUtils.suffixFileFilter(".txt")); + * + * // Combine the directory and file filters using an OR condition + * java.io.FileFilter fooFilter = + * FileFilterUtils.orFileFilter(fooDirFilter, fooFileFilter); + * + * // Use the filter to construct a DirectoryWalker implementation + * FooDirectoryWalker walker = new FooDirectoryWalker(fooFilter, -1); + * * </pre> * * @since Commons IO 1.3 Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileDeleteStrategy.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileDeleteStrategy.java?view=diff&rev=448799&r1=448798&r2=448799 ============================================================================== --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileDeleteStrategy.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileDeleteStrategy.java Thu Sep 21 21:14:48 2006 @@ -131,9 +131,22 @@ * Force file deletion strategy. */ static class ForceFileDeleteStrategy extends FileDeleteStrategy { + /** Default Constructor */ ForceFileDeleteStrategy() { super("Force"); } + + /** + * Deletes the file object. + * <p> + * This implementation uses <code>FileUtils.forceDelete() <code> + * if the file exists. + * + * @param fileToDelete the file to delete, not null + * @return Always returns <code>true</code> + * @throws NullPointerException if the file is null + * @throws IOException if an error occurs during file deletion + */ protected boolean doDelete(File fileToDelete) throws IOException { if (fileToDelete.exists()) { FileUtils.forceDelete(fileToDelete); Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileSystemUtils.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileSystemUtils.java?view=diff&rev=448799&r1=448798&r2=448799 ============================================================================== --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileSystemUtils.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileSystemUtils.java Thu Sep 21 21:14:48 2006 @@ -378,6 +378,7 @@ * Performs the os command. * * @param cmdAttribs the command line parameters + * @param max The maximum limit for the lines returned * @return the parsed data * @throws IOException if an error occurs */ Modified: jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java URL: http://svn.apache.org/viewvc/jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java?view=diff&rev=448799&r1=448798&r2=448799 ============================================================================== --- jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java (original) +++ jakarta/commons/proper/io/trunk/src/java/org/apache/commons/io/FileUtils.java Thu Sep 21 21:14:48 2006 @@ -1370,10 +1370,10 @@ * The value of the checksum is returned. * * @param file the file to checksum, not null - * @param checksum the checksum object to be used, not null * @return the checksum value * @throws NullPointerException if the file or checksum is null * @throws IllegalArgumentException if the file is a directory + * @throws IOException if an IO error occurs reading the file * @since Commons IO 1.3 */ public static long checksumCRC32(File file) throws IOException { @@ -1396,6 +1396,7 @@ * @return the checksum specified, updated with the content of the file * @throws NullPointerException if the file or checksum is null * @throws IllegalArgumentException if the file is a directory + * @throws IOException if an IO error occurs reading the file * @since Commons IO 1.3 */ public static Checksum checksum(File file, Checksum checksum) throws IOException { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]