/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file, final String name) { for (final String prefix : prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file) { final String name = file.getName(); for (final String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
return IOCase.SYSTEM.checkStartsWith(canonicalChild, canonicalParent);
@Test public void test_checkStartsWith_case() throws Exception { assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "AB")); assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "Ab")); assertTrue(IOCase.INSENSITIVE.checkStartsWith("ABC", "AB")); assertTrue(IOCase.INSENSITIVE.checkStartsWith("ABC", "Ab")); assertTrue(IOCase.SYSTEM.checkStartsWith("ABC", "AB")); assertEquals(WINDOWS, IOCase.SYSTEM.checkStartsWith("ABC", "Ab")); }
@Test public void test_checkStartsWith_functionality() throws Exception { assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "")); assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "A")); assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "AB")); assertTrue(IOCase.SENSITIVE.checkStartsWith("ABC", "ABC")); assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "BC")); assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "C")); assertFalse(IOCase.SENSITIVE.checkStartsWith("ABC", "ABCD")); assertFalse(IOCase.SENSITIVE.checkStartsWith("", "ABC")); assertTrue(IOCase.SENSITIVE.checkStartsWith("", "")); try { IOCase.SENSITIVE.checkStartsWith("ABC", null); fail(); } catch (final NullPointerException ignore) {} try { IOCase.SENSITIVE.checkStartsWith(null, "ABC"); fail(); } catch (final NullPointerException ignore) {} try { IOCase.SENSITIVE.checkStartsWith(null, null); fail(); } catch (final NullPointerException ignore) {} }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ public boolean accept(File file, String name) { for (int i = 0; i < prefixes.length; i++) { if (caseSensitivity.checkStartsWith(name, prefixes[i])) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ public boolean accept(File file, String name) { for (int i = 0; i < prefixes.length; i++) { if (caseSensitivity.checkStartsWith(name, prefixes[i])) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file, final String name) { for (final String prefix : prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(File file, String name) { for (String prefix : prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file, final String name) { for (final String prefix : prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File directory * @param name the filename * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(File file, String name) { for (String prefix : prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file) { final String name = file.getName(); for (final String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ public boolean accept(File file) { String name = file.getName(); for (int i = 0; i < this.prefixes.length; i++) { if (caseSensitivity.checkStartsWith(name, prefixes[i])) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ public boolean accept(File file) { String name = file.getName(); for (int i = 0; i < this.prefixes.length; i++) { if (caseSensitivity.checkStartsWith(name, prefixes[i])) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(final File file) { final String name = file.getName(); for (final String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(File file) { String name = file.getName(); for (String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
/** * Checks to see if the filename starts with the prefix. * * @param file the File to check * @return true if the filename starts with one of our prefixes */ @Override public boolean accept(File file) { String name = file.getName(); for (String prefix : this.prefixes) { if (caseSensitivity.checkStartsWith(name, prefix)) { return true; } } return false; }
return IOCase.SYSTEM.checkStartsWith(canonicalChild, canonicalParent);
return IOCase.SYSTEM.checkStartsWith(canonicalChild, canonicalParent);
return IOCase.SYSTEM.checkStartsWith(canonicalChild, canonicalParent);