(fname, data)
return path
Returns a proposed path based on fname to the storage folder of the data.
    Attempts to preserve the extension but also removes all whitespace from the filenames.
Returns a proposed path based on fname to the storage folder of the data.
    Attempts to preserve the extension but also removes all whitespace from the filenames.
Returns a proposed path based on fname to the storage folder of the data . Attempts to preserve the extension but also removes all whitespace from the filenames .
def create_path(fname, data):
    """
    Returns a proposed path based on fname to the storage folder of the data.
    Attempts to preserve the extension but also removes all whitespace from the filenames.
    """
    # Select the file name.

    fname = os.path.basename(fname)

    # The data storage directory.
    data_dir = data.get_data_dir()

    # Make the data directory if it does not exist.
    os.makedirs(data_dir, exist_ok=True)

    # Build the file name under the new location.
    path = os.path.abspath(os.path.join(data_dir, fname))

    return path
def create_path ( fname , data ) : # Select the file name. fname = os . path . basename ( fname ) # The data storage directory. data_dir = data . get_data_dir ( ) # Make the data directory if it does not exist. os . makedirs ( data_dir , exist_ok = True ) # Build the file name under the new location. path = os . path . abspath ( os . path . join ( data_dir , fname ) ) return path