FileUtils

io.shiftleft.js2cpg.io.FileUtils$
object FileUtils

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

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

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

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.

Attributes

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

Calculates various statistics of the source. 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.

Calculates various statistics of the source. 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.

Attributes

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