Method: Chef::ChefFS::FilePattern#exact_path
- Defined in:
- lib/chef/chef_fs/file_pattern.rb
#exact_path ⇒ Object
If this pattern represents an exact path, returns the exact path.
abc/def.exact_path == 'abc/def'
abc/*def.exact_path == 'abc/def'
abc/x\\yz.exact_path == 'abc/xyz'
128 129 130 131 132 133 |
# File 'lib/chef/chef_fs/file_pattern.rb', line 128 def exact_path return nil if has_double_star || exact_parts.any?(&:nil?) result = Chef::ChefFS::PathUtils.join(*exact_parts) is_absolute ? Chef::ChefFS::PathUtils.join("", result) : result end |