FileUtils

object FileUtils
class Object
trait Matchable
class Any

Type members

Classlikes

final case
class FileStatistics(linesOfCode: Long, longestLineLength: Int, containsMarker: Boolean)

Value members

Concrete methods

def cleanPath(sourceFileName: String): String

Cleans the given path as String and removes unwanted elements that occur during transpilation on the Windows platform and/or CI environments.

Cleans the given path as String and removes unwanted elements that occur during transpilation on the Windows platform and/or CI environments.

def contentMapFromFile(path: Path): Map[Int, String]
def copyToDirectory(from: File, directory: File, config: Config)(implicit copyOptions: CopyOptions): File
def fileStatistics(lines: Seq[String]): FileStatistics

Calculates various statistics of the source.

Calculates various statistics of the source.

  • lines of code
  • longest line of code
  • containment of a given marker

This implementation is just as fast as the unix word count program wc -l. By using Scala BufferedSource we gain a lot of performance as it uses a Java PushbackReader and BufferedReader.

def getFileTree(rootPath: Path, config: Config, extensions: List[String], filterIgnoredFiles: Boolean): List[Path]
def md5(files: Seq[Path]): String
def positionLookupTables(source: String): (SortedMap[Int, Int], SortedMap[Int, Int])
def readLinesInFile(path: Path): Seq[String]