downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

svn_fs_file_contents> <svn_fs_delete
[edit] Last updated: Fri, 25 May 2012

view this page in

svn_fs_dir_entries

(PECL svn >= 0.1.0)

svn_fs_dir_entries指定したパスのディレクトリを列挙し、ディレクトリ名とファイルタイプのハッシュを返す

説明

array svn_fs_dir_entries ( resource $fsroot , string $path )
警告

この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。

指定したパスのディレクトリを列挙し、ディレクトリ名とファイルタイプのハッシュを返します。

注意

警告

この関数は、 実験的 なものです。この関数の動作・ 名前・その他ドキュメントに書かれている事項は、予告なく、将来的な PHP のリリースにおいて変更される可能性があります。 この関数は自己責任で使用してください。



add a note add a note User Contributed Notes svn_fs_dir_entries
qwazix at outofbounds dot gr 08-Feb-2011 07:05
Here is a function that returns an array with the directories in the root of the HEAD revision of a repository, using only the path of the repository.
<?php
   
function get_repo_dirs($path){
        if (
file_exists($path.'/format'))
        if (
$repo = svn_repos_open($path))
        if (
$repo_fs = svn_repos_fs($repo))
        if (
$head = svn_fs_youngest_rev($repo_fs))
        if (
$repo_fs_root = svn_fs_revision_root($repo_fs,$head))
        return
array_keys(svn_fs_dir_entries($repo_fs_root,'.'));
        else return
false;
    }
?>

example usage

<?php
    var_dump
(get_repo_dirs('/home/user/svnrepos/example_project'));
?>

 
show source | credits | stats | sitemap | contact | advertising | mirror sites