(self)
Check if provided FILE (FOLDER) path exists.
            If not - return the same path.
            If exists - ask user save next version or overwrite. Return new path based on user decision
Check if provided FILE (FOLDER) path exists.
            If not - return the same path.
            If exists - ask user save next version or overwrite. Return new path based on user decision
Check if provided FILE ( FOLDER ) path exists . If not - return the same path . If exists - ask user save next version or overwrite . Return new path based on user decision
def version_control(self):
        """
        Check if provided FILE (FOLDER) path exists.
            If not - return the same path.
            If exists - ask user save next version or overwrite. Return new path based on user decision
        """

        if not os.path.exists(self.path):
            print '>> File saved to a new version: {}'.format(self.name)
            return self.path
        else:
            self.build_last_file_version()

            # Ask user which version to save
            if self.type == 'path' or self.type == 'sequence':
                file_name = self.name
            else:
                file_name = self.path

            answer = SNV(file_name).exec_()

            if not answer:
                return

            if answer == 2:  # Overwrite
                print '>> File overwritten: {}'.format(self.name)
            if answer == 3:  # Save latest version
                self.build_latest_file_version()
                print '>> File saved to a new version: {}'.format(self.name)

            return self.path
def version_control ( self ) : if not os . path . exists ( self . path ) : print '>> File saved to a new version: {}' . format ( self . name ) return self . path else : self . build_last_file_version ( ) # Ask user which version to save if self . type == 'path' or self . type == 'sequence' : file_name = self . name else : file_name = self . path answer = SNV ( file_name ) . exec_ ( ) if not answer : return if answer == 2 : # Overwrite print '>> File overwritten: {}' . format ( self . name ) if answer == 3 : # Save latest version self . build_latest_file_version ( ) print '>> File saved to a new version: {}' . format ( self . name ) return self . path