summaryrefslogtreecommitdiff
path: root/README.markdown
diff options
context:
space:
mode:
authorOliver Bertuch <o.bertuch@fz-juelich.de>2014-11-25 12:45:23 +0100
committerOliver Bertuch <o.bertuch@fz-juelich.de>2014-11-25 12:45:23 +0100
commit89995e4db0eacf55260cf5ca85e715e2e45dfce5 (patch)
tree675c2dfee276e8f108f539155a10905d25560e12 /README.markdown
parent4ebea40e08f20f3eaa36f9decc01be6353e3a804 (diff)
Allow array of pathes in validate_absolute_path
Diffstat (limited to 'README.markdown')
-rw-r--r--README.markdown49
1 files changed, 28 insertions, 21 deletions
diff --git a/README.markdown b/README.markdown
index 78839c6..957be9b 100644
--- a/README.markdown
+++ b/README.markdown
@@ -461,27 +461,34 @@ You can also use this with arrays. For example, `unique(["a","a","b","b","c","c"
* `uriescape`: Urlencodes a string or array of strings. Requires either a single string or an array as an input. *Type*: rvalue
-* `validate_absolute_path`: Validate that the string represents an absolute path in the filesystem. This function works for Windows and Unix-style paths.
- The following values will pass:
-
- ```
- $my_path = "C:/Program Files (x86)/Puppet Labs/Puppet"
- validate_absolute_path($my_path)
- $my_path2 = "/var/lib/puppet"
- validate_absolute_path($my_path2)
- ```
-
- The following values will fail, causing compilation to abort:
-
- ```
- validate_absolute_path(true)
- validate_absolute_path([ 'var/lib/puppet', '/var/foo' ])
- validate_absolute_path([ '/var/lib/puppet', 'var/foo' ])
- $undefined = undef
- validate_absolute_path($undefined)
- ```
-
- *Type*: statement
+* `validate_absolute_path`: Validate the string represents an absolute path in the filesystem. This function works for Windows and Unix style paths.
+
+ The following values will pass:
+
+ ```
+ $my_path = 'C:/Program Files (x86)/Puppet Labs/Puppet'
+ validate_absolute_path($my_path)
+ $my_path2 = '/var/lib/puppet'
+ validate_absolute_path($my_path2)
+ $my_path3 = ['C:/Program Files (x86)/Puppet Labs/Puppet','C:/Program Files/Puppet Labs/Puppet']
+ validate_absolute_path($my_path3)
+ $my_path4 = ['/var/lib/puppet','/usr/share/puppet']
+ validate_absolute_path($my_path4)
+ ```
+
+ The following values will fail, causing compilation to abort:
+
+ ```
+ validate_absolute_path(true)
+ validate_absolute_path('../var/lib/puppet')
+ validate_absolute_path('var/lib/puppet')
+ validate_absolute_path([ 'var/lib/puppet', '/var/foo' ])
+ validate_absolute_path([ '/var/lib/puppet', 'var/foo' ])
+ $undefined = undef
+ validate_absolute_path($undefined)
+ ```
+
+ *Type*: statement
* `validate_array`: Validate that all passed values are array data structures. Abort catalog compilation if any value fails this check.