test_class.declarator: PATH
test_class.modifier: static
test_class.original_string: static File PATH;
test_class.type: File
test_class.var_name: PATH
test_class.declarator: ABSOLUTE_INSIDE
test_class.modifier: static
test_class.original_string: static File ABSOLUTE_INSIDE;
test_class.type: File
test_class.var_name: ABSOLUTE_INSIDE
test_class.declarator: ABSOLUTE_DIR_INSIDE
test_class.modifier: static
test_class.original_string: static File ABSOLUTE_DIR_INSIDE;
test_class.type: File
test_class.var_name: ABSOLUTE_DIR_INSIDE
test_class.declarator: RELATIVE_INSIDE
test_class.modifier: static
test_class.original_string: static File RELATIVE_INSIDE;
test_class.type: File
test_class.var_name: RELATIVE_INSIDE
test_class.declarator: RELATIVE_DIR_INSIDE
test_class.modifier: static
test_class.original_string: static File RELATIVE_DIR_INSIDE;
test_class.type: File
test_class.var_name: RELATIVE_DIR_INSIDE
test_class.declarator: ABSOLUTE_OUTSIDE
test_class.modifier: static
test_class.original_string: static File ABSOLUTE_OUTSIDE;
test_class.type: File
test_class.var_name: ABSOLUTE_OUTSIDE
test_class.declarator: RELATIVE_OUTSIDE
test_class.modifier: static
test_class.original_string: static File RELATIVE_OUTSIDE;
test_class.type: File
test_class.var_name: RELATIVE_OUTSIDE
test_class.declarator: PATHS
test_class.modifier: static
test_class.original_string: static File[] PATHS;
test_class.type: File[]
test_class.var_name: PATHS
test_class.file: utilities/src/test/java/ec/tstoolkit/utilities/Files2Test.java
test_class.identifier: Files2Test
test_case.body: @Test
      public void testGetRelativeFile() {
          // relative inside
          assertEquals(RELATIVE_INSIDE, Files2.getRelativeFile(PATHS, RELATIVE_INSIDE));
          assertSame(RELATIVE_INSIDE, Files2.getRelativeFile(PATHS, RELATIVE_INSIDE));
          assertFalse(Files2.getRelativeFile(PATHS, RELATIVE_INSIDE).isAbsolute());
  
          // absolute inside
          assertEquals(RELATIVE_INSIDE, Files2.getRelativeFile(PATHS, ABSOLUTE_INSIDE));
          assertNotSame(RELATIVE_INSIDE, Files2.getRelativeFile(PATHS, ABSOLUTE_INSIDE));
          assertFalse(Files2.getRelativeFile(PATHS, ABSOLUTE_INSIDE).isAbsolute());
  
          // relative outside
          assertEquals(RELATIVE_OUTSIDE, Files2.getRelativeFile(PATHS, RELATIVE_OUTSIDE));
          assertSame(RELATIVE_OUTSIDE, Files2.getRelativeFile(PATHS, RELATIVE_OUTSIDE));
          assertFalse(Files2.getRelativeFile(PATHS, RELATIVE_OUTSIDE).isAbsolute());
  
          // absolute outside
          assertNotEquals(RELATIVE_OUTSIDE, Files2.getRelativeFile(PATHS, ABSOLUTE_OUTSIDE));
          assertNotSame(RELATIVE_OUTSIDE, Files2.getRelativeFile(PATHS, ABSOLUTE_OUTSIDE));
          assertNull(Files2.getRelativeFile(PATHS, ABSOLUTE_OUTSIDE));
      }
test_case.class_method_signature: Files2Test.testGetRelativeFile()
test_case.full_signature: @Test public void testGetRelativeFile()
test_case.identifier: testGetRelativeFile
test_case.invocations: assertEquals getRelativeFile assertSame getRelativeFile assertFalse isAbsolute getRelativeFile assertEquals getRelativeFile assertNotSame getRelativeFile assertFalse isAbsolute getRelativeFile assertEquals getRelativeFile assertSame getRelativeFile assertFalse isAbsolute getRelativeFile assertNotEquals getRelativeFile assertNotSame getRelativeFile assertNull getRelativeFile
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGetRelativeFile()
focal_class.file: utilities/src/main/java/ec/tstoolkit/utilities/Files2.java
focal_class.identifier: Files2
focal_class.class_method_signature: Files2.Files2()
focal_class.full_signature: private  Files2()
focal_class.identifier: Files2
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  Files2()
focal_class.class_method_signature: Files2.fromPath(String parent, String... path)
focal_class.full_signature: public static File fromPath(String parent, String... path)
focal_class.identifier: fromPath
focal_class.modifiers: public static
focal_class.parameters: (String parent, String... path)
focal_class.return: File
focal_class.signature: File fromPath(String parent, String... path)
focal_class.class_method_signature: Files2.isValidPath(File file)
focal_class.full_signature: @Deprecated public static boolean isValidPath(File file)
focal_class.identifier: isValidPath
focal_class.modifiers: @Deprecated public static
focal_class.parameters: (File file)
focal_class.return: boolean
focal_class.signature: boolean isValidPath(File file)
focal_class.class_method_signature: Files2.getAbsoluteFile(@NonNull File[] paths, @NonNull File file)
focal_class.full_signature: @Nullable public static File getAbsoluteFile(@NonNull File[] paths, @NonNull File file)
focal_class.identifier: getAbsoluteFile
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@NonNull File[] paths, @NonNull File file)
focal_class.return: File
focal_class.signature: File getAbsoluteFile(@NonNull File[] paths, @NonNull File file)
focal_class.class_method_signature: Files2.getRelativeFile(@NonNull File[] paths, @NonNull File file)
focal_class.full_signature: @Nullable public static File getRelativeFile(@NonNull File[] paths, @NonNull File file)
focal_class.identifier: getRelativeFile
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@NonNull File[] paths, @NonNull File file)
focal_class.return: File
focal_class.signature: File getRelativeFile(@NonNull File[] paths, @NonNull File file)
focal_class.class_method_signature: Files2.acceptByLowerCaseExtension(File pathname, String... lowerCaseExtensions)
focal_class.full_signature: public static boolean acceptByLowerCaseExtension(File pathname, String... lowerCaseExtensions)
focal_class.identifier: acceptByLowerCaseExtension
focal_class.modifiers: public static
focal_class.parameters: (File pathname, String... lowerCaseExtensions)
focal_class.return: boolean
focal_class.signature: boolean acceptByLowerCaseExtension(File pathname, String... lowerCaseExtensions)
focal_class.class_method_signature: Files2.extractFile(@NonNull String path)
focal_class.full_signature: @Nullable public static File extractFile(@NonNull String path)
focal_class.identifier: extractFile
focal_class.modifiers: @Nullable public static
focal_class.parameters: (@NonNull String path)
focal_class.return: File
focal_class.signature: File extractFile(@NonNull String path)
focal_method.body: @Nullable
      public static File getRelativeFile(@NonNull File[] paths, @NonNull File file) {
          if (!file.isAbsolute()) {
              return file;
          }
          String path = file.getAbsolutePath();
          for (File parent : paths) {
              String parentPath = parent.getAbsolutePath() + File.separator;
              if (path.startsWith(parentPath)) {
                  return new File(path.substring(parentPath.length()));
              }
          }
          // absolute file outside paths
          return null;
      }
focal_method.class_method_signature: Files2.getRelativeFile(@NonNull File[] paths, @NonNull File file)
focal_method.full_signature: @Nullable public static File getRelativeFile(@NonNull File[] paths, @NonNull File file)
focal_method.identifier: getRelativeFile
focal_method.invocations: isAbsolute getAbsolutePath getAbsolutePath startsWith substring length
focal_method.modifiers: @Nullable public static
focal_method.parameters: (@NonNull File[] paths, @NonNull File file)
focal_method.return: File
focal_method.signature: File getRelativeFile(@NonNull File[] paths, @NonNull File file)