svn_add
Schedules the addition of an item in a working directory
説明
bool svn_add(string $path, bool $recursive = true, bool $force = false)
Adds the file, directory or symbolic link at path
to the working directory. The item will be added to the repository
the next time you call svn_commit on the working
copy.
パラメータ
-
path
-
Path of item to add.
注意: 相対パスは、PHP バイナリが存在するディレクトリを基準として解決されます。呼び出しもとのスクリプトの作業ディレクトリを基準とするには、realpath あるいは dirname(__FILE__) を使用してください。
-
recursive
-
If item is directory, whether or not to recursively add
all of its contents. Default is
true
-
force
-
If true, Subversion will recurse into already versioned directories
in order to add unversioned files that may be hiding in those
directories. Default is
false
戻り値
成功した場合に true を、失敗した場合に false を返します。
例
例1 svn_add example
In a working directory where svn status
returns:
$ svn status
? foobar.txt
<?php
svn_add('foobar.txt');
?>
...will schedule foobar.txt for addition into
the repository.
注意
警告この関数は、
実験的 なものです。この関数の動作・
名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP
のリリースにおいて変更される可能性があります。
この関数は自己責任で使用してください。