Class: File

Defined in: src/nodes/file.coffee
Inherits: Class

Overview

The file class is a fake class that wraps the

Instance Method Summary

Inherited Method Summary

Methods inherited from Class

.constructor, .getFileName, .getDoc, .getFullName, .getClassName, .getName, .getLocation, .getNamespace, .getParentClassName, .getMethods, .getVariables, .toJSON

Methods inherited from Node

.findAncestor

Constructor Details

.constructor(node, fileName, lineMapping, options) Source

Construct a File

Parameters:

  • nodethe class node (a [Object])
  • thefilename (a [String])
  • optionsthe parser options (a [Object])

Instance Method Details

.getFileName() Source

Returns the file class name

Returns:

  • Returns the file name without path (a [String])

.getFullName() Source

Get the full file name with path

Returns:

  • Returns the file name with path (a [String])

.getPath() Source

Get the file path

Returns:

  • Returns the file path (a [String])

.isEmpty() Source

Test if the file doesn't contain any top-level

Returns:

  • Returns true if empty (a [Boolean])

.toJSON() Source

Get a JSON representation of the object

Returns:

  • Returns the JSON object (a [Object])