Module: VagrantPlugins::Parallels::SyncedFolderCap::MountOptions
- Extended by:
- Util::UnixMountHelpers
- Defined in:
- lib/vagrant-parallels/cap/mount_options.rb
Constant Summary collapse
- PRL_MOUNT_TYPE =
"prl_fs".freeze
Class Method Summary collapse
-
.mount_name(*args) ⇒ Object
We have to support 2 different expected interfaces of ‘mount_name` call: Vagrant < 2.2.15: `def self.mount_name(machine, data)` Vagrant >= 2.2.15: `def self.mount_name(machine, id, data)` github.com/Parallels/vagrant-parallels/issues/384.
-
.mount_options(machine, name, guest_path, options) ⇒ Object
Returns mount options for a parallels synced folder.
- .mount_type(machine) ⇒ Object
Methods included from Util::UnixMountHelpers
detect_owner_group_ids, emit_upstart_notification, extended, find_mount_options_id, merge_mount_options
Class Method Details
.mount_name(*args) ⇒ Object
We have to support 2 different expected interfaces of ‘mount_name` call:
Vagrant < 2.2.15: `def self.mount_name(machine, data)`
Vagrant >= 2.2.15: `def self.mount_name(machine, id, data)`
38 39 40 41 42 43 44 45 46 |
# File 'lib/vagrant-parallels/cap/mount_options.rb', line 38 def self.mount_name(*args) if args.length >= 3 id = args[1] else id = args[-1][:guestpath] end id.gsub(/[*":<>?|\/\\]/,'_').sub(/^_/, '') end |
.mount_options(machine, name, guest_path, options) ⇒ Object
Returns mount options for a parallels synced folder
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/vagrant-parallels/cap/mount_options.rb', line 17 def self.(machine, name, guest_path, ) = .fetch(:mount_options, []) detected_ids = detect_owner_group_ids(machine, guest_path, , ) mount_uid = detected_ids[:uid] mount_gid = detected_ids[:gid] << "uid=#{mount_uid}" << "gid=#{mount_gid}" << "_netdev" = .join(',') return , mount_uid, mount_gid end |
.mount_type(machine) ⇒ Object
30 31 32 |
# File 'lib/vagrant-parallels/cap/mount_options.rb', line 30 def self.mount_type(machine) return PRL_MOUNT_TYPE end |