# Path: ship/utils/fileloaders/fileloader.py
# class FileLoader(object):
#     def __init__(self):
#     def loadFile(self, filepath, arg_dict={}):
# 
# Path: ship/utils/filetools.py
# def getFile(file_path):
# def writeFile(contents, file_path, add_newline=True):
# def finalFolder(path):
# def setFinalFolder(path, folder_name):
# def getFileName(in_path, with_extension=False):
# def directory(in_path):
#     def __init__(self, path, root=None):
#     def _setupVars(self, path):
#     def finalFolder(self):
#     def setFinalFolder(self, folder_name):
#     def absolutePath(self, filename=None, relative_roots=[], normalize=True):
#     def directory(self):
#     def relativePath(self, with_extension=True, filename=None):
#     def filenameAndExtension(self):
#     def setAbsolutePath(self, absolute_path, keep_relative_root=False):
#     def setFilename(self, filename, has_extension=False, keep_extension=False):
#     def pathExists(self, ext=None):
# class PathHolder(object):
#     ABSOLUTE, RELATIVE, DIRECTORY, NAME, EXTENSION, NAME_AND_EXTENSION = range(6)


import os
from ship.utils.fileloaders import fileloader as fl
from ship.utils import filetools
    Summary:
        Example use of the fmp package to update file paths in an .ief file
        and save the ief file under a new name.
    
    Author:  
        Duncan Runnacles

    Created:  
        01 Apr 2016

    Copyright:  
        Duncan Runnacles 2016

    TODO:

    Updates:

"""

# Contains functions for updating file paths and reading/writing files


def iefExample():
    """update some key file paths in an ief file.
    
    Updates the .dat file, .tcf file, and results file paths referenced by
    the ief file and save it under a new ief file name. 
    """
    # Load the tuflow model with a tcf file
    ief_file = r'C:\path\to\an\isis\ieffile.ief'

# Path: ship/utils/fileloaders/fileloader.py
# class FileLoader(object):
#     def __init__(self):
#     def loadFile(self, filepath, arg_dict={}):
# 
# Path: ship/utils/filetools.py
# def getFile(file_path):
# def writeFile(contents, file_path, add_newline=True):
# def finalFolder(path):
# def setFinalFolder(path, folder_name):
# def getFileName(in_path, with_extension=False):
# def directory(in_path):
#     def __init__(self, path, root=None):
#     def _setupVars(self, path):
#     def finalFolder(self):
#     def setFinalFolder(self, folder_name):
#     def absolutePath(self, filename=None, relative_roots=[], normalize=True):
#     def directory(self):
#     def relativePath(self, with_extension=True, filename=None):
#     def filenameAndExtension(self):
#     def setAbsolutePath(self, absolute_path, keep_relative_root=False):
#     def setFilename(self, filename, has_extension=False, keep_extension=False):
#     def pathExists(self, ext=None):
# class PathHolder(object):
#     ABSOLUTE, RELATIVE, DIRECTORY, NAME, EXTENSION, NAME_AND_EXTENSION = range(6)


# Path: examples/ieffileupdate.py
import os
from ship.utils.fileloaders import fileloader as fl
from ship.utils import filetools

    Summary:
        Example use of the fmp package to update file paths in an .ief file
        and save the ief file under a new name.
    
    Author:  
        Duncan Runnacles

    Created:  
        01 Apr 2016

    Copyright:  
        Duncan Runnacles 2016

    TODO:

    Updates:

"""

# Contains functions for updating file paths and reading/writing files


def iefExample():
    """update some key file paths in an ief file.
    
    Updates the .dat file, .tcf file, and results file paths referenced by
    the ief file and save it under a new ief file name. 
    """
    # Load the tuflow model with a tcf file
    ief_file = r'C:\path\to\an\isis\ieffile.ief'

    loader = fl.FileLoader()