diff --git a/src/main/java/org/libj/io/FastFiles.java b/src/main/java/org/libj/io/FileUtil.java similarity index 99% rename from src/main/java/org/libj/io/FastFiles.java rename to src/main/java/org/libj/io/FileUtil.java index 271f9be..bc2f2ae 100644 --- a/src/main/java/org/libj/io/FastFiles.java +++ b/src/main/java/org/libj/io/FileUtil.java @@ -35,7 +35,7 @@ /** * Utility functions for operations pertaining to {@link File} and {@link Path}. */ -public final class FastFiles { +public final class FileUtil { private static File CWD; private static File TEMP_DIR; @@ -240,6 +240,6 @@ public static String getShortName(final File file) { return index == -1 ? name : name.substring(0, index); } - private FastFiles() { + private FileUtil() { } } \ No newline at end of file diff --git a/src/test/java/org/libj/io/FastFilesTest.java b/src/test/java/org/libj/io/FileUtilTest.java similarity index 57% rename from src/test/java/org/libj/io/FastFilesTest.java rename to src/test/java/org/libj/io/FileUtilTest.java index 6186ae0..0536ce5 100644 --- a/src/test/java/org/libj/io/FastFilesTest.java +++ b/src/test/java/org/libj/io/FileUtilTest.java @@ -22,19 +22,19 @@ import org.junit.Test; -public class FastFilesTest { +public class FileUtilTest { @Test public void testCommonality() { try { - FastFiles.commonality(); + FileUtil.commonality(); fail("Expected IllegalArgumentException"); } catch (final IllegalArgumentException e) { } - assertEquals(new File("foo"), FastFiles.commonality(new File("foo"))); - assertEquals(new File("/"), FastFiles.commonality(new File("/foo"), new File("/bar"))); - assertEquals(new File(""), FastFiles.commonality(new File("foo"), new File("bar"))); + assertEquals(new File("foo"), FileUtil.commonality(new File("foo"))); + assertEquals(new File("/"), FileUtil.commonality(new File("/foo"), new File("/bar"))); + assertEquals(new File(""), FileUtil.commonality(new File("foo"), new File("bar"))); final File[] files = { new File("/var/lib/foo/bar/hi.txt"), @@ -44,17 +44,17 @@ public void testCommonality() { new File("/var/lib/foo/bar/a/b/hello.txt") }; - assertEquals(new File("/var/lib/foo"), FastFiles.commonality(files)); + assertEquals(new File("/var/lib/foo"), FileUtil.commonality(files)); } @Test public void testGetShortName() { - assertEquals("", FastFiles.getShortName(new File(""))); - assertEquals("share", FastFiles.getShortName(new File("file:///usr/share/../share.txt"))); - assertEquals("lib", FastFiles.getShortName(new File("file:///usr/share/../share/../lib"))); - assertEquals("var", FastFiles.getShortName(new File("/usr/share/../share/../lib/../../var.old"))); - assertEquals("var", FastFiles.getShortName(new File("/usr/share/../share/../lib/../../var/"))); - assertEquals("resolv", FastFiles.getShortName(new File("/etc/resolv.conf"))); - assertEquals("name", FastFiles.getShortName(new File("name"))); + assertEquals("", FileUtil.getShortName(new File(""))); + assertEquals("share", FileUtil.getShortName(new File("file:///usr/share/../share.txt"))); + assertEquals("lib", FileUtil.getShortName(new File("file:///usr/share/../share/../lib"))); + assertEquals("var", FileUtil.getShortName(new File("/usr/share/../share/../lib/../../var.old"))); + assertEquals("var", FileUtil.getShortName(new File("/usr/share/../share/../lib/../../var/"))); + assertEquals("resolv", FileUtil.getShortName(new File("/etc/resolv.conf"))); + assertEquals("name", FileUtil.getShortName(new File("name"))); } } \ No newline at end of file