# File lib/puppet/network/handler/fileserver.rb, line 420
420:       def expand(path, client = nil)
421:         # This map should probably be moved into a method.
422:         map = nil
423: 
424:         if client
425:           map = clientmap(client)
426:         else
427:           Puppet.notice "No client; expanding '#{path}' with local host"
428:           # Else, use the local information
429:           map = localmap
430:         end
431:         path.gsub(/%(.)/) do |v|
432:           key = $1
433:           if key == "%"
434:             "%"
435:           else
436:             map[key] || v
437:           end
438:         end
439:       end