Finds the Vagrantfile in the given directory.

 @param [Pathname] path Path to search in.
 @return [Pathname]
166389
def find_vagrantfile(search_path, filenames=nil)
      filenames ||= ["Vagrantfile", "vagrantfile"]
      filenames.each do |vagrantfile|
        current_path = search_path.join(vagrantfile)
        return current_path if current_path.file?
      end

      nil
    end
938547
def find(id)
      return nil unless id
      meta = DCell.registry.get_node(id)
      DirectoryMeta.new(id, meta)
    end
764464
def get_file(cls, path):
        
        depot_name, file_id = path.split('/', 1)
        depot = cls.get(depot_name)
        return depot.get(file_id)
1178392
def get_files_recursively_from directory
        dir = Pathname.new directory
        return nil  unless (dir.directory?)
        return dir.each_child.map do |file|
          next file.realpath.to_path            if (file.file?)
          next get_files_recursively_from file  if (file.directory?)
        end .flatten
      end
42052
def find_misc_path(name)
      [name, name.upcase, name.downcase].each do |base|
        ['.md', '', '.txt', '.html'].each do |suffix|
          path = File.join(spec.full_gem_path, base+suffix)
          return path if File.exist?(path) && Dir.entries(File.dirname(path)).include?(File.basename(path))
        end
      end
      # Didn't find anything
      nil
    end
1355458
def file_path

      self.path= File.join(Dir.pwd, uri_file_name) unless path
      if File.directory?(path)
        self.path= File.join(self.path, uri_file_name)
      end

      self.path

    end
1341242
def find_file(path, tgt_env='base', **kwargs):  # pylint: disable=W0613
    '''
    
    '''
    return _gitfs().find_file(path, tgt_env=tgt_env, **kwargs)
998116
def vagrant(dir = Dir.pwd, options = {})
      info "Initialize Vagrant (see https://www.vagrantup.com/)"
      path = normalized_path(dir)
      use_git = FalkorLib::Git.init?(path)
      rootdir = (use_git) ? FalkorLib::Git.rootdir(path) : path
      templatedir = File.join( FalkorLib.templates, 'vagrant')
      config = FalkorLib::Config::Bootstrap::DEFAULTS[:vagrant].clone
      if options[:os]
        config[:os] = options[:os]
      else
        config[:os] = select_from(config[:boxes].keys,
                    "Select OS to configure within your vagrant boxes by default",
                    (config[:boxes].keys.find_index(config[:os]) + 1))
      end
      [ :ram, :vcpus, :domain, :range ].each do |k|
        config[k.to_sym] = ask("\tDefault #{k.capitalize}:", config[k.to_sym])
      end
      puts config.to_yaml
      FalkorLib::GitFlow.start('feature', 'vagrant', rootdir) if (use_git && FalkorLib::GitFlow.init?(rootdir))
      init_from_template(templatedir, rootdir, config,
                         :no_interaction => true,
                         :no_commit => true)
      [ 'bootstrap.sh', 'config.yaml.sample' ].each do |f|
        FalkorLib::Git.add(File.join(rootdir, 'vagrant', "#{f}")) if use_git
      end
      Dir.chdir( rootdir ) do
        run %(git ignore '.vagrant/' )
        #   run %(ln -s README.md index.md )
      #   run %(ln -s README.md contributing/index.md )
      #   run %(ln -s README.md setup/index.md )
      end
      FalkorLib::Git.add(File.join(rootdir, '.gitignore')) if use_git

      #exit_status.to_i
    end
1332859
def __get_file_path(self, path, saltenv='base'):
        '''
        
        '''
        try:
            path = self._check_proto(path)
        except MinionError as err:
            # Local file path
            if not os.path.isfile(path):
                log.warning(
                    'specified file %s is not present to generate hash: %s',
                    path, err
                )
                return None
            else:
                return path
        return self._find_file(path, saltenv)
1081447
def find_file(path, search_path):
    

    if isinstance(search_path, str):
        search_path = [search_path]
    for relative in search_path:
        candidate = os.path.normpath(os.path.join(relative, path))
        if os.path.isfile(candidate):
            return candidate

    return None
1103897
def glob_directory(path)
      results = ::Dir[path]

      return results unless RUBY_PLATFORM =~ /darwin/

      results.map { |r| r.encode('UTF-8', 'UTF-8-MAC') }
    end
1257895
def get(path)
      path = path.split(/\./) if path.is_a?(String)
      candidate = self
      while !path.empty?
        key = path.shift
        if candidate[key]
          candidate = candidate[key]
        else
          candidate = nil
          last
        end
      end
      candidate
    end
1127466
def <<( str )
      path = Pathname( str )

      case
      when !path.exist?
        raise Errno::ENOENT, path.to_path
      when !path.directory?
        raise Errno::ENOTDIR, path.to_path
      else
        super path.expand_path
      end
    end
79830
def search!(path, node = doc)
      node.search(path) or raise Error::NodeNotFound, "node for `#{path}` not found"
    end
1066651
def find( str )
      super lambda { raise Errno::ENOENT, str } do |dir|
        path = extensions.find do |ext|
          file = dir.join str + ext
          break file if file.exist?
        end
        break path if path
      end
    end
620737
def find_css(path = @path)
        Dir.glob(path).select { |f| File.file? f }.map { |file| file }
      end
1105399
private File getFileFromPath(final String path) {
        File result = (path != null) ? new File(path) : null;
        // AS7-1752 see if a non-existent relative path exists relative to the home dir
        if (result != null && homeDir != null && !result.exists() && !result.isAbsolute()) {
            File relative = new File(homeDir, path);
            if (relative.exists()) {
                result = relative;
            }
        }
        return result;
    }