Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atom/tree-view
🌳 Explore and open project files in Atom
https://github.com/atom/tree-view
Last synced: 4 days ago
JSON representation
🌳 Explore and open project files in Atom
- Host: GitHub
- URL: https://github.com/atom/tree-view
- Owner: atom
- License: mit
- Archived: true
- Created: 2013-08-13T18:17:54.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2022-12-01T08:50:35.000Z (almost 2 years ago)
- Last Synced: 2024-08-01T19:38:42.924Z (3 months ago)
- Language: CoffeeScript
- Homepage:
- Size: 2.34 MB
- Stars: 560
- Watchers: 53
- Forks: 364
- Open Issues: 233
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
##### Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our [official announcement](https://github.blog/2022-06-08-sunsetting-atom/)
# Tree View package
[![CI](https://github.com/atom/tree-view/actions/workflows/ci.yml/badge.svg)](https://github.com/atom/tree-view/actions/workflows/ci.yml)Explore and open files in the current project.
Press ctrl-\\ or cmd-\\ to open/close the tree view and
alt-\\ or ctrl-0 to focus it.When the tree view has focus you can press a, shift-a,
m, or delete to add, move or delete files and folders.To move the Tree view to the opposite side, select and drag the Tree view dock to the other side.
![](https://f.cloud.github.com/assets/671378/2241932/6d9cface-9ceb-11e3-9026-31d5011d889d.png)
## API
This package provides a service that you can use in other Atom packages.
To use it, include `tree-view` in the `consumedServices` section of your
`package.json`:``` json
{
"name": "my-package",
"consumedServices": {
"tree-view": {
"versions": {
"^1.0.0": "consumeTreeView"
}
}
}
}
```Then, in your package's main module, call methods on the service:
``` coffee
module.exports =
activate: -> # ...consumeTreeView: (treeView) ->
selectedPaths = treeView.selectedPaths()
# Do something with the paths...
```The `tree-view` API has two methods:
* `selectedPaths()` - Returns the paths to the selected tree view entries.
* `entryForPath(entryPath)` - Returns a tree view entry for the given path.## Customization
The tree view displays icons next to files. These icons are customizable by
installing a package that provides an `atom.file-icons` service.The `atom.file-icons` service must provide the following methods:
* `iconClassForPath(path)` - Returns a CSS class name to add to the file view.