IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Application
  • AssetManager
  • Attach
  • AuthManager
  • Browser
  • Cache
  • Category
  • Engine
  • Log
  • MessageSource
  • PerformanceMeasurement
  • PlugManager
  • Request
  • ThemeManager
  • Upgrade
  • Upload

Class Upgrade

Namespace: application\core\components
Located at system/core/components/Upgrade.php

Methods summary

public array
# fetchUpdateFileList( array $upgradeInfo )

获取更新文件列表 原名fetch_updatefile_list

获取更新文件列表 原名fetch_updatefile_list

Parameters

$upgradeInfo
版本信息

Returns

array
array('file'=>文件名列表, 'md5'=>每个文件对应的md5码)

Author

Ring
public array
# compareBaseFile( array $upgradeInfo, array $upgradeFileList )

对比文件,筛选出需要更新的文件列表 原名compare_basefile

对比文件,筛选出需要更新的文件列表 原名compare_basefile

Parameters

$upgradeInfo
更新信息
$upgradeFileList
需要更新的文件列表

Returns

array
array(需要更新的文件列表, 不需要更新的文件列表, 被忽略的文件列表(不存在或者被忽略的文件))

Author

Ring
public boolean
# compareFileContent( string $file, string $remoteFile )

原名compare_file_content

原名compare_file_content

Parameters

$file
$remoteFile

Returns

boolean

Author

Ring
public boolean
# checkUpgrade( )

检查更新信息,这些信息将被记录在setting中的upgrade中

检查更新信息,这些信息将被记录在setting中的upgrade中

Returns

boolean

Author

Ring
public boolean
# checkFolderPerm( array $updateFileList )

原名check_folder_perm

原名check_folder_perm

Parameters

$updateFileList

Returns

boolean

Author

Ring
public integer
# testWritAble( string $dir )

测试是否有写文件的权限,有返回1 原名test_writable

测试是否有写文件的权限,有返回1 原名test_writable

Parameters

$dir

Returns

integer

Author

Ring
public boolean|integer
# downloadFile( array $upgradeInfo, string $file, string $folder = 'upload', string $md5 = '', integer $position = 0, integer $offset = 0 )

下载文件 原名download_file

下载文件 原名download_file

Parameters

$upgradeInfo
更新信息
$file
文件名(包括目录名)
$folder
目录名,此目录名并不是指本地,而是官方服务器的目录
$md5
md5码
$position
$position 文件指针,指定文件指针后,下载器将从这个指针开始下载
$offset
$offset 指定本文内容长度,仅仅检验下载文件的长度是否和$offset相等,如果相等将不执行md5检验

Returns

boolean|integer
0 md5检验失败 1 断点文件下载成功 2 md5检验成功(文件完全下载完成才会进行)

Author

Ring
public boolean
# mkdirs( string $dir )

新建目录

新建目录

Parameters

$dir

Returns

boolean

Author

Ring
public boolean
# copyFile( string $srcFile, string $desFile, string $type )

原名copy_file

原名copy_file

Parameters

$srcFile
$desFile
$type

Returns

boolean

Author

Ring
public string
# versionPath( )

versionPath

versionPath

Returns

string
public
# copyDir( string $srcDir, string $destDir )

复制目录

复制目录

Parameters

$srcDir
$destDir
public
# rmdirs( string $srcDir )

删除目录

删除目录

Parameters

$srcDir
IBOS open source API documentation generated by ApiGen