metasploit-framework

https://github.com/rapid7/metasploit-framework

Ruby

Metasploit Framework

Tree#add_at_path

Attach the given tree at the indicated path.  The path given
is always assumed to be from the root of the Tree being
attached to.

The path is given as a string separated by '/'.  Each portion
of the string is matched against the name of the particular
tree.  

Given :

  a --- b --- c
\ 
	d - e --- f
 		\
  		g - h

* the path +a/b/c+ will match the path to Tree +c+
* the path +d/e/g+ will _not_ match anything as the path must start at +a+ here
* the path +a/d/e+ will _not_ match anytthin as +e+ is not a child of +d+
* the path +a/d/e/g+ will match node +g+

Leading and trailing '/' on the path are not necessary and removed.

Source | Google | Stack overflow

Edit

git clone [email protected]:rapid7/metasploit-framework.git

cd metasploit-framework

open lib/rabal/tree.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Tree-add_at_path-for-pr


# Commit to git

git add lib/rabal/tree.rbgit commit -m "better docs for Tree#add_at_path"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Tree-add_at_path-for-pr

hub pull-request


# Celebrate!