mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
add win_basename and win_dirname filters
This commit is contained in:
@@ -338,10 +338,18 @@ To get the last name of a file path, like 'foo.txt' out of '/etc/asdf/foo.txt'::
|
||||
|
||||
{{ path | basename }}
|
||||
|
||||
To get the last name of a windows style file path (new in version 2.0)::
|
||||
|
||||
{{ path | win_basename }}
|
||||
|
||||
To get the directory from a path::
|
||||
|
||||
{{ path | dirname }}
|
||||
|
||||
To get the directory from a windows path (new version 2.0)::
|
||||
|
||||
{{ path | win_dirname }}
|
||||
|
||||
To expand a path containing a tilde (`~`) character (new in version 1.5)::
|
||||
|
||||
{{ path | expanduser }}
|
||||
|
||||
Reference in New Issue
Block a user