dismiss Step into the future! Click here to switch to the beta php.net site
downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

svn_fs_file_contents> <svn_fs_delete
[edit] Last updated: Fri, 28 Jun 2013

view this page in

svn_fs_dir_entries

(PECL svn >= 0.1.0)

svn_fs_dir_entriesEnumerates the directory entries under path; returns a hash of dir names to file type

Description

array svn_fs_dir_entries ( resource $fsroot , string $path )
Warning

This function is currently not documented; only its argument list is available.

Enumerates the directory entries under path; returns a hash of dir names to file type

Notes

Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.



add a note add a note User Contributed Notes svn_fs_dir_entries - [1 notes]
up
0
qwazix at outofbounds dot gr
2 years ago
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