Class: Project
Defined in: | ../atom/src/project.coffee |
Inherits: | Model |
Overview
Represents a project that's opened in Atom.
An instance of this class is always available as the atom.project
global.
Class Method Summary
- .pathForRepositoryUrl(repoUrl) Find the local path for the given repository URL.
Instance Method Summary
- ::contains(pathToCheck) Returns whether the given path is inside this project.
- ::getPath() Returns the project's fullpath.
- ::getRepo() Returns the {Git} repository if available.
- ::getRootDirectory() Returns the root {Directory} object for this project.
- ::relativize(fullPath) Make the given path relative to the project directory.
- ::replace(regex, replacementText, filePaths, iterator) Performs a replace across all the specified files in the project.
- String ::resolve(uri) Given a uri, this resolves it relative to the project directory.
- ::scan(regex, options = {}, iterator) Performs a search across all the files in the project.
- ::setPath(projectPath) Sets the project's fullpath.
Class Method Details
.pathForRepositoryUrl(repoUrl) Source
Find the local path for the given repository URL.
Instance Method Details
::contains(pathToCheck) Source
Returns whether the given path is inside this project.
::getPath() Source
Returns the project's fullpath.
::getRepo() Source
Returns the {Git} repository if available.
::getRootDirectory() Source
Returns the root {Directory} object for this project.
::relativize(fullPath) Source
Make the given path relative to the project directory.
::replace(regex, replacementText, filePaths, iterator) Source
Performs a replace across all the specified files in the project.
String ::resolve(uri) Source
Given a uri, this resolves it relative to the project directory. If the path is already absolute or if it is prefixed with a scheme, it is returned unchanged.
::scan(regex, options = {}, iterator) Source
Performs a search across all the files in the project.
::setPath(projectPath) Source
Sets the project's fullpath.