Class: File

Class Name File
Superclass Object
File src/models/file.coffee

Description

Represents a file and its status.

::constructor(path, repo, mode)

Constructs a new instance of File.

Argument Description
path The file path as String.
repo The repository as PromisedGit.
mode The porcelain status as String.
::update(mode)

Update the porcelain status.

Argument Description
mode The porcelain status as String.
::isAdded()

Test if the file is added.

Return Values
Returns a Boolean
::isCopied()

Test if the file is copied.

Return Values
Returns a Boolean
::isDeleted()

Test if the file is deleted.

Return Values
Returns a Boolean
::isModified()

Test if the file is modified.

Return Values
Returns a Boolean
::isRenamed()

Test if the file is renamed.

Return Values
Returns a Boolean
::isStaged()

Test if the file is staged.

Return Values
Returns a Boolean
::isUnstaged()

Test if the file is unstaged.

Return Values
Returns a Boolean
::isUntracked()

Test if the file is untracked.

Return Values
Returns a Boolean
::show(oid)

Get the content of a file at this Treeish.

Argument Description
oid The oid to show the file at as String | Treeish.
Return Values
Returns a Promise that resolves to the content at oid as String.