/*
 * Copyright (C) 2010 TranceCode Software
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 * 
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this library; if not, write to the Free Software Foundation, Inc.,
 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
 */
package org.trancecode.io;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

/**
 * Utility methods related to {@link File}.
 * 
 * @author Herve Quiroz
 */
public final class Files
{
    private Files()
    {
        // No instantiation
    }

    public static FileInputStream newFileInputStream(final File file)
    {
        try
        {
            return new FileInputStream(file);
        }
        catch (final FileNotFoundException e)
        {
            throw new IllegalStateException(file.toString(), e);
        }
    }

    public static FileOutputStream newFileOutputStream(final File file)
    {
        try
        {
            return new FileOutputStream(file);
        }
        catch (final FileNotFoundException e)
        {
            throw new IllegalStateException(file.toString(), e);
        }
    }
}

@@ -809,16 +809,110 @@
 de.io;%0A%0A
+import com.google.common.base.Preconditions;%0Aimport com.google.common.collect.ImmutableList;%0A%0A
 import j
@@ -1026,16 +1026,39 @@
 tStream;
+%0Aimport java.util.List;
 %0A%0A/**%0A *
@@ -1804,11 +1804,223 @@
  %7D%0A    %7D
+%0A%0A    public static List%3CFile%3E listDirectories(final File directory)%0A    %7B%0A        Preconditions.checkNotNull(directory);%0A        return ImmutableList.copyOf(directory.listFiles(FileFilters.isDirectory()));%0A    %7D
 %0A%7D%0A

Add Files.listDirectories()