File

Inherit from Node

Primary key: id: int

schema File extends Node {
  @primary id: int
}

File::getLocation

pub fn getLocation(self: File) -> Location;

File::getAnAncestorForIndex

  • Parameter self: File
  • Parameter index: int
  • Return Node
pub fn getAnAncestorForIndex(self: File, index: int) -> Node;

File::getAnAncestor

pub fn getAnAncestor(self: File) -> *Node;

File::isRootNode

  • Parameter self: File
  • Return bool
pub fn isRootNode(self: File) -> bool;

File::hasLocation

  • Parameter self: File
  • Return bool
pub fn hasLocation(self: File) -> bool;

File::getDepthFromRoot

  • Parameter self: File
  • Return int
pub fn getDepthFromRoot(self: File) -> int;

File::isTestFile

  • Parameter self: File
  • Return bool
pub fn isTestFile(self: File) -> bool;

File::getAchildNode

pub fn getAchildNode(self: File) -> *Node;

File::isModFile

  • Parameter self: File
  • Return bool
pub fn isModFile(self: File) -> bool;

File::isGoFile

  • Parameter self: File
  • Return bool
pub fn isGoFile(self: File) -> bool;

File::__all__

Data constraint method.

pub fn __all__(db: GoDB) -> *File;

File::getMd5Sum

  • Parameter self: File
  • Return string
pub fn getMd5Sum(self: File) -> string;

File::getBelongsFile

pub fn getBelongsFile(self: File) -> File;

File::getLineInfo

pub fn getLineInfo(self: File) -> NumberOfLineDO;

File::getSha256Sum

  • Parameter self: File
  • Return string
pub fn getSha256Sum(self: File) -> string;

File::countAssociatedComment

  • Parameter self: File
  • Return int
pub fn countAssociatedComment(self: File) -> int;

File::getName

  • Parameter self: File
  • Return string
pub fn getName(self: File) -> string;

File::getFunctionCount

/**
* 获取每个文件包含的函数
*/
  • Parameter self: File
  • Return int
pub fn getFunctionCount(self: File) -> int;

File::getBelongsPkg

pub fn getBelongsPkg(self: File) -> Pkg;

File::getPkgName

  • Parameter self: File
  • Return string
pub fn getPkgName(self: File) -> string;

File::getType

  • Parameter self: File
  • Return string
pub fn getType(self: File) -> string;

File::print

  • Parameter self: File
  • Return *string
pub fn print(self: File) -> *string;

File::getTextStartOffset

  • Parameter self: File
  • Return int
pub fn getTextStartOffset(self: File) -> int;

File::getChildCount

  • Parameter self: File
  • Return int
pub fn getChildCount(self: File) -> int;

File::getTextSize

  • Parameter self: File
  • Return int
pub fn getTextSize(self: File) -> int;

File::getParentNode

pub fn getParentNode(self: File) -> Node;

File::getPkgLoc

pub fn getPkgLoc(self: File) -> Location;

File::getAssociatedCommentString

  • Parameter self: File
  • Return string
pub fn getAssociatedCommentString(self: File) -> string;

File::getBelongsFunction

pub fn getBelongsFunction(self: File) -> Function;

File::getText

// getText Extract the text associated with a specific node in a file
  • Parameter self: File
  • Return string
pub fn getText(self: File) -> string;