# Path: vimswitch/Settings.py
# def getSettings(app):
#     return app.get('settings', createSettings(app))
# 
# Path: vimswitch/DiskIo.py
# def getDiskIo(app):
#     return app.get('diskIo', createDiskIo(app))


import os
from .Settings import getSettings
from .DiskIo import getDiskIo
                self.diskIo.deleteFile(filePath)

        for dir in self.settings.profileDirs:
            dirPath = os.path.join(path, dir)
            if self.diskIo.dirExists(dirPath):
                self.diskIo.deleteDir(dirPath)

    def copy(self, srcPath, destPath):
        """
        Copies profile data from srcPath to destPath. Will replace existing
        files at destPath.
        """
        for file in self.settings.profileFiles:
            srcFilePath = os.path.join(srcPath, file)
            destFilePath = os.path.join(destPath, file)
            if self.diskIo.fileExists(srcFilePath):
                self.diskIo.copyFile(srcFilePath, destFilePath)

        for dir in self.settings.profileDirs:
            srcDirPath = os.path.join(srcPath, dir)
            destDirPath = os.path.join(destPath, dir)
            if self.diskIo.dirExists(srcDirPath):
                self.diskIo.copyDir(srcDirPath, destDirPath)


def getProfileDataIo(app):
    return app.get('profileDataIo', createProfileDataIo(app))


def createProfileDataIo(app):

# Path: vimswitch/Settings.py
# def getSettings(app):
#     return app.get('settings', createSettings(app))
# 
# Path: vimswitch/DiskIo.py
# def getDiskIo(app):
#     return app.get('diskIo', createDiskIo(app))


# Path: vimswitch/ProfileDataIo.py
import os
from .Settings import getSettings
from .DiskIo import getDiskIo

                self.diskIo.deleteFile(filePath)

        for dir in self.settings.profileDirs:
            dirPath = os.path.join(path, dir)
            if self.diskIo.dirExists(dirPath):
                self.diskIo.deleteDir(dirPath)

    def copy(self, srcPath, destPath):
        """
        Copies profile data from srcPath to destPath. Will replace existing
        files at destPath.
        """
        for file in self.settings.profileFiles:
            srcFilePath = os.path.join(srcPath, file)
            destFilePath = os.path.join(destPath, file)
            if self.diskIo.fileExists(srcFilePath):
                self.diskIo.copyFile(srcFilePath, destFilePath)

        for dir in self.settings.profileDirs:
            srcDirPath = os.path.join(srcPath, dir)
            destDirPath = os.path.join(destPath, dir)
            if self.diskIo.dirExists(srcDirPath):
                self.diskIo.copyDir(srcDirPath, destDirPath)


def getProfileDataIo(app):
    return app.get('profileDataIo', createProfileDataIo(app))


def createProfileDataIo(app):

    settings = getSettings(app)