Class: Vagrant::Plugin::V2::SyncedFolder
- Inherits:
-
Object
- Object
- Vagrant::Plugin::V2::SyncedFolder
- Defined in:
- lib/vagrant/plugin/v2/synced_folder.rb
Overview
This is the base class for a synced folder implementation.
Instance Method Summary collapse
-
#cleanup(machine, opts) ⇒ Object
This is called after destroying the machine during a
vagrant destroy
and also prior to syncing folders during avagrant up
. -
#disable(machine, folders, opts) ⇒ Object
This is called to remove the synced folders from a running machine.
-
#enable(machine, folders, opts) ⇒ Object
This is called after the machine is booted and after networks are setup.
- #prepare(machine, folders, opts) ⇒ Object deprecated Deprecated.
-
#usable?(machine, raise_error = false) ⇒ Boolean
This is called early when the synced folder is set to determine if this implementation can be used for this machine.
Instance Method Details
#cleanup(machine, opts) ⇒ Object
This is called after destroying the machine during a
vagrant destroy
and also prior to syncing folders during
a vagrant up
.
No return value.
55 56 |
# File 'lib/vagrant/plugin/v2/synced_folder.rb', line 55 def cleanup(machine, opts) end |
#disable(machine, folders, opts) ⇒ Object
This is called to remove the synced folders from a running machine.
This is not guaranteed to be called, but this should be implemented by every synced folder implementation.
44 45 |
# File 'lib/vagrant/plugin/v2/synced_folder.rb', line 44 def disable(machine, folders, opts) end |
#enable(machine, folders, opts) ⇒ Object
This is called after the machine is booted and after networks are setup.
This might be called with new folders while the machine is running. If so, then this should add only those folders without removing any existing ones.
No return value.
31 32 |
# File 'lib/vagrant/plugin/v2/synced_folder.rb', line 31 def enable(machine, folders, opts) end |
#prepare(machine, folders, opts) ⇒ Object
DEPRECATED: This will be removed.
20 21 |
# File 'lib/vagrant/plugin/v2/synced_folder.rb', line 20 def prepare(machine, folders, opts) end |
#usable?(machine, raise_error = false) ⇒ Boolean
This is called early when the synced folder is set to determine if this implementation can be used for this machine. This should return true or false.
14 15 |
# File 'lib/vagrant/plugin/v2/synced_folder.rb', line 14 def usable?(machine, raise_error=false) end |