data0.paths =========== .. py:module:: data0.paths Functions --------- .. autoapisummary:: data0.paths.verify_path data0.paths.remove_non_empty_directory data0.paths.make_file_path Module Contents --------------- .. py:function:: verify_path(path) Verify that the filepath exists. Check if the path to the data files exists and is valid. If not, raise an error. :param path: Relative path to the directory containing data files. :type path: `str` :raises FileNotFoundError: If the specified path does not exist. :returns: **path** -- The verified path to the data files. :rtype: `str` .. rubric:: Examples >>> verify_path('datafiles/') 'datafiles/' .. py:function:: remove_non_empty_directory(base_dir) Remove a non-empty directory and all its contents. Recursively delete all files and directories in the given path. :param base_dir: Relative path to the directory to be removed. :type base_dir: `str` .. py:function:: make_file_path(path) Create a file path. Create the specified directory structure if the given path doesn't exist. :param path: Relative path to make. :type path: `str` :returns: **path** -- The verified path to the data files. :rtype: `str` .. rubric:: Examples >>> make_file_path('datafiles/some/more/data/a_file.txt') 'datafiles/some/more/data/'