Skip to content
Snippets Groups Projects
Commit 4ea48533 authored by Paul McCarthy's avatar Paul McCarthy
Browse files

splitExt wrapper in image module.

parent 1de490d4
No related branches found
No related tags found
No related merge requests found
...@@ -26,6 +26,7 @@ and file names: ...@@ -26,6 +26,7 @@ and file names:
looksLikeImage looksLikeImage
removeExt removeExt
splitExt
addExt addExt
defaultExt defaultExt
loadIndexedImageFile loadIndexedImageFile
...@@ -799,6 +800,15 @@ def removeExt(filename): ...@@ -799,6 +800,15 @@ def removeExt(filename):
return fslpath.removeExt(filename, ALLOWED_EXTENSIONS) return fslpath.removeExt(filename, ALLOWED_EXTENSIONS)
def splitExt(filename):
"""Splits the base name and extension for the given ``filename``.
See :func:`~fsl.utils.path.splitExt`.
"""
return fslpath.splitExt(filename, ALLOWED_EXTENSIONS)
def addExt(prefix, mustExist=True): def addExt(prefix, mustExist=True):
"""Adds a file extension to the given file ``prefix``. """Adds a file extension to the given file ``prefix``.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment