Previous Table of Contents Index Next
Perforce 2009.2: Command Reference



p4 dirs
Synopsis
List the immediate subdirectories of specified depot directories.
Syntax
p4 [g-opts] dirs [-C -D -H] depot_directory[revRange]...
Description
Use p4 dirs to find the immediate subdirectories of any depot directories provided as arguments. Any directory argument must be provided in depot syntax and must end with the * wildcard. If you use the "..." wildcard, you will receive the wrong results!
p4 dirs only lists the immediate subdirectories of the directory arguments. To recursively list all of a directory's subdirectories, call p4 dirs multiple times.
By default, only subdirectories that contain at least one undeleted file will be returned. To include those subdirectories that contain only deleted files, use the -D flag.
This command is meant to be used in scripts that call Perforce; it is unlikely that you'll have a need to call it from the command line.
Options
Usage Notes
Can File Arguments Use
Revision Specifier?
If you include a revision specifier or revision range as part of a directory argument, then the only subdirectories returned are those that contain at least one file revision that matches the given specifier.
Perforce does not track directories in its database; thus, the subdirectory values are not looked up, but are computed. This accounts for some of the strange details of the p4 dirs implementation, such as the fact that the "..." wildcard is not supported.
Examples
Returns a list of all the immediate subdirectories of //depot/projects.
The "..." wildcard is not supported by p4 dirs.
Related Commands
 


Previous Table of Contents Index Next

Perforce 2009.2: Command Reference
Copyright 1999-2009 Perforce Software.