CpgLoader

io.shiftleft.codepropertygraph.cpgloading.CpgLoader
object CpgLoader

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CpgLoader.type

Members list

Value members

Concrete methods

def isFlatgraphFormat(path: Path): Boolean
def isOverflowDbFormat(path: Path): Boolean
def isProtoFormat(path: Path): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

def isProtoFormat(filename: String): Boolean

Determine whether the CPG is a proto CPG

Determine whether the CPG is a proto CPG

Attributes

def load(filename: String): Cpg

Load a Code Property Graph from the given file

Load a Code Property Graph from the given file

Attributes

def load(from: String, persistTo: String): Cpg

Load a Code Property Graph from the given file - persist in given second file. I.e. the given input file will not be modified, all changes will be written to the given 'persistTo' file. *

Load a Code Property Graph from the given file - persist in given second file. I.e. the given input file will not be modified, all changes will be written to the given 'persistTo' file. *

Attributes

def load(path: Path): Cpg

Load a Code Property Graph from the given file

Load a Code Property Graph from the given file

Notes:

  • detects the format as either flatgraph, overflowdb or proto
  • a flatgraph storage opened straight away
  • OverflowDb and proto formats are first converted to flatgraph, which is written to the persistTo file
  • OverflowDb and proto formats are first converted to flatgraph, and therefor we create a new flatgraph storage path, which can be obtained via cpg.graph.storagePathMaybe

Attributes

def load(from: Path, persistTo: Path): Cpg

Load a Code Property Graph from the given file, but persist it in the given second file. I.e. the given input file will not be modified, all changes will be written to the given 'persistTo' file.

Load a Code Property Graph from the given file, but persist it in the given second file. I.e. the given input file will not be modified, all changes will be written to the given 'persistTo' file.

Notes:

  • if the given 'persistTo' file already exists, it will be overridden
  • detects the format as either flatgraph, overflowdb or proto
  • a flatgraph storage is copied to the persistTo file and then opened straight away
  • OverflowDb and proto formats are first converted to flatgraph, which is written to the persistTo file

Attributes

def loadFromOverflowDb(path: Path, persistTo: Path): Cpg

Load Code Property Graph from an overflow DB file, by first converting it into a flatgraph binary

Load Code Property Graph from an overflow DB file, by first converting it into a flatgraph binary

Attributes

Deprecated methods

def isLegacyCpg(filename: String): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

Deprecated
true
def isLegacyCpg(path: Path): Boolean

Determine whether the CPG is a legacy (proto) CPG

Determine whether the CPG is a legacy (proto) CPG

Attributes

Deprecated
true