mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-06-19 06:13:00 +00:00
add win_basename and win_dirname filters
This commit is contained in:
parent
fad44862a5
commit
f69da544f7
2 changed files with 11 additions and 0 deletions
|
|
@ -21,6 +21,7 @@ import sys
|
|||
import base64
|
||||
import json
|
||||
import os.path
|
||||
import ntpath
|
||||
import types
|
||||
import pipes
|
||||
import glob
|
||||
|
|
@ -251,6 +252,8 @@ class FilterModule(object):
|
|||
'realpath': partial(unicode_wrap, os.path.realpath),
|
||||
'relpath': partial(unicode_wrap, os.path.relpath),
|
||||
'splitext': partial(unicode_wrap, os.path.splitext),
|
||||
'win_basename': partial(unicode_wrap, ntpath.basename),
|
||||
'win_dirname': partial(unicode_wrap, ntpath.dirname),
|
||||
|
||||
# value as boolean
|
||||
'bool': bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue