Add postfix for a full file path.

        Examples:
            >>> FileClass.add_postfix('/home/zhulj/dem.tif', 'filled')
            '/home/zhulj/dem_filled.tif'
            >>> FileClass.add_postfix('dem.tif', 'filled')
            'dem_filled.tif'
            >>> FileClass.add_postfix('dem', 'filled')
            'dem_filled'

def add_postfix(file_path, postfix):
        # type: (AnyStr, AnyStr) -> AnyStr
        """Add postfix for a full file path.

        Examples:
            >>> FileClass.add_postfix('/home/zhulj/dem.tif', 'filled')
            '/home/zhulj/dem_filled.tif'
            >>> FileClass.add_postfix('dem.tif', 'filled')
            'dem_filled.tif'
            >>> FileClass.add_postfix('dem', 'filled')
            'dem_filled'
        """
        cur_sep = ''
        for sep in ['\\', '/', os.sep]:
            if sep in file_path:
                cur_sep = sep
                break
        corename = FileClass.get_core_name_without_suffix(file_path)
        tmpspliter = os.path.basename(file_path).split('.')
        suffix = ''
        if len(tmpspliter) > 1:
            suffix = tmpspliter[-1]
        newname = os.path.dirname(file_path) + cur_sep + corename + '_' + postfix
        if suffix != '':
            newname += '.' + suffix
        return str(newname)