# File lib/puppet/network/handler/fileserver.rb, line 508
508:             def fileobj(path, links, client)
509:                 obj = nil
510:                 if obj = @files[file_path(path, client)]
511:                     # This can only happen in local fileserving, but it's an
512:                     # important one.  It'd be nice if we didn't just set
513:                     # the check params every time, but I'm not sure it's worth
514:                     # the effort.
515:                     obj[:check] = CHECKPARAMS
516:                 else
517:                     obj = Puppet::Type.type(:file).new(
518:                         :name => file_path(path, client),
519:                         :check => CHECKPARAMS
520:                     )
521:                     @files[file_path(path, client)] = obj
522:                 end
523: 
524:                 if links == :manage
525:                     links = :follow
526:                 end
527: 
528:                 # This, ah, might be completely redundant
529:                 unless obj[:links] == links
530:                     obj[:links] = links
531:                 end
532: 
533:                 return obj
534:             end