Method: Vagrant::BoxCollection#directory
- Defined in:
- lib/vagrant/box_collection.rb
#directory ⇒ Pathname (readonly)
The directory where the boxes in this collection are stored.
A box collection matches a very specific folder structure that Vagrant expects in order to easily manage and modify boxes. The folder structure is the following:
COLLECTION_ROOT/BOX_NAME/PROVIDER/[ARCHITECTURE]/.json
Where:
- COLLECTION_ROOT - This is the root of the box collection, and is the directory given to the initializer.
- BOX_NAME - The name of the box. This is a logical name given by the user of Vagrant.
- PROVIDER - The provider that the box was built for (VirtualBox, VMware, etc.).
- ARCHITECTURE - Optional. The architecture that the box was built for (amd64, arm64, 386, etc.).
- metadata.json - A simple JSON file that at the bare minimum contains a "provider" key that matches the provider for the box. This metadata JSON, however, can contain anything.
44 45 46 |
# File 'lib/vagrant/box_collection.rb', line 44 def directory @directory end |