Class Puppet::Network::Handler::FileServer::Mount
In: lib/puppet/network/handler/fileserver.rb
Parent: Puppet::Network::AuthStore

A simple class for wrapping mount points. Instances of this class don‘t know about the enclosing object; they‘re mainly just used for authorization.

Methods

clientmap   copy   expand   expandable?   file_path   fileobj   list   localmap   new   path   path=   path_exists?   properties   read_file   reclist   subdir   sync   to_s   valid?  

Attributes

name  [R] 

Public Class methods

Create out object. It must have a name.

Public Instance methods

Create a map for a specific client.

Return a new mount with the same properties as self, except with a different name and path.

Replace % patterns as appropriate.

Do we have any patterns in our path, yo?

Return a fully qualified path, given a short path and possibly a client name.

List the contents of the relative path relpath of this mount.

recurse is the number of levels to recurse into the tree, or false to provide no recursion or true if you just want to go for broke.

ignore is an array of filenames to ignore when traversing the list.

The return value of this method is a complex nest of arrays, which describes a directory tree. Each file or directory is represented by an array, where the first element is the path of the file (relative to the root of the mount), and the second element is the type. A directory is represented by an array as well, where the first element is a "directory" array, while the remaining elements are other file or directory arrays. Confusing? Hell yes. As an added bonus, all names must start with a slash, because… well, I‘m fairly certain a complete explanation would involve the words "crack pipe" and "bad batch".

Cache this manufactured map, since if it‘s used it‘s likely to get used a lot.

Return the path as appropriate, expanding as necessary.

Verify that the path given exists within this mount‘s subtree.

Return the current values for the object.

Read the contents of the file at the relative path given.

Retrieve a specific directory relative to a mount point. If they pass in a client, then expand as necessary.

Verify our configuration is valid. This should really check to make sure at least someone will be allowed, but, eh.

[Validate]