Class UtilsKt

  • All Implemented Interfaces:

    
    public final class UtilsKt
    
                        
    • Constructor Detail

    • Method Detail

      • getVCS_DIRECTORIES

         final Set<String> getVCS_DIRECTORIES()

        A set of directories used by version control systems to store metadata. The list covers also version control systems not supported by ORT, because such directories should never be considered.

      • enumSetOf

         final static <T extends Enum<T>> EnumSet<T> enumSetOf(T elems)

        A Kotlin-style convenience function to replace EnumSet.of() and EnumSet.noneOf().

      • getAllAncestorDirectories

         final static List<String> getAllAncestorDirectories(String file)

        Return recursively all ancestor directories of the given absolute file, ordered along the path from the parent of file to the root.

      • getCommonParentFile

         final static File getCommonParentFile(Collection<File> files)

        Return the longest parent file that all files have in common, or a File with an empty path if they have no common parent file.

      • joinNonBlank

         final static String joinNonBlank(String strings, String separator)

        Return the concatenated strings separated by separator whereas blank strings are omitted.

      • temporaryProperties

         final static <R extends Any> R temporaryProperties(Pair<String, String> properties, Function0<R> block)

        Temporarily set the specified system properties while executing block. Afterwards, previously set properties have their original values restored and previously unset properties are cleared.