将指定的文件同步到其它服务器
boolean Core_File::sync( string $file [, $storage = string(7) "default" ] )
参数列表
参数 类型 描述 默认值 $file
string
Name $storage
unknown
string(7) "default"
boolean
public static function sync($file, $storage = 'default')
{
$info = File::check_and_get_path($file);
if (File::can_do_run($storage))
{
# 本机无需操作
return true;
}
else
{
if (is_file($file))
{
# 通过create_file把文件再创建一次
return File::create_file($file, file_get_contents($file), null, null, $storage);
}
}
}