"""Functions that help us work with files and folders.
"""
"""Returns True if `keyboard_name` is a keyboard we can compile.
"""
= / /
= /
return
"""Returns a Path object representing the relative path under qmk_firmware, or None.
"""
=
return
return None
"""Returns the path to a keyboard's directory relative to the qmk root.
"""
return /
"""Locate the correct directory for storing a keymap.
Args:
keyboard_name
The name of the keyboard. Example: clueboard/66/rev3
"""
=
return
=
"""Returns a `pathlib.Path()` object for a given path.
This will use the path to a file as seen from the directory the script was called from. You should use this to normalize filenames supplied from the command line.
"""
=
return
return /
"""normalize and check exists
otherwise magic strings like '-' for stdin resolve to bad paths
"""
=
return