svn_cleanup

(PECL svn >= 0.1.0)

svn_cleanupRecursively cleanup a working copy directory, finishing incomplete operations and removing locks

說明

svn_cleanup(string $workingdir): bool

Recursively cleanup working copy directory workingdir, finishing any incomplete operations and removing working copy locks. Use when a working copy is in limbo and needs to be usable again.

參數(shù)

workingdir

String path to local working directory to cleanup

注意: 相對路徑將會以PHP執(zhí)行文件所在目錄作為當(dāng)前工作目錄進(jìn)行解析。如果希望依據(jù)腳本所在目錄解析, 使用realpath() 或 dirname(__FILE__)。

返回值

成功時返回 true, 或者在失敗時返回 false

范例

示例 #1 Basic example

This example demonstrates clean up of a working copy in a directory named help-me:

<?php
svn_cleanup
(realpath('help-me'));
?>

The realpath() call is necessary due to SVN's quirky handling of relative paths.

注釋

警告

此函數(shù)是實驗性的。此函數(shù)的表象,包括名稱及其相關(guān)文檔都可能在未來的 PHP 發(fā)布版本中未通知就被修改。使用本函數(shù)風(fēng)險自擔(dān)。