RepositoryGetDepotDirs Method (Options, String)
|
List selected directory paths in the repository.
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.2.269.3570
Syntax public IList<string> GetDepotDirs(
Options options,
params string[] dirs
)
Public Function GetDepotDirs (
options As Options,
ParamArray dirs As String()
) As IList(Of String)
public:
IList<String^>^ GetDepotDirs(
Options^ options,
... array<String^>^ dirs
)
member GetDepotDirs :
options : Options *
dirs : string[] -> IList<string>
Parameters
- options
- Type: Perforce.P4Options
- dirs
- Type: SystemString
Return Value
Type:
IListStringRemarks
p4 help dirs
dirs -- List depot subdirectories
p4 dirs [-C -D -H] [-S stream] dir[revRange] ...
List directories that match the specified file pattern (dir).
This command does not support the recursive wildcard (...).
Use the * wildcard instead.
Perforce does not track directories individually. A path is treated
as a directory if there are any undeleted files with that path as a
prefix.
By default, all directories containing files are listed. If the dir
argument includes a revision range, only directories containing files
in the range are listed. For details about specifying file revisions,
see 'p4 help revisions'.
The -C flag lists only directories that fall within the current
client view.
The -D flag includes directories containing only deleted files.
The -H flag lists directories containing files synced to the current
client workspace.
The -S flag limits output to depot directories mapped in a stream's
client view.
Examples
To get dirs on the server that fall within the current client view:
GetDepotDirsCmdOptions opts =
new GetDepotDirsCmdOptions(GetDepotDirsCmdFlags.CurrentClientOnly, null);
IList<String> target = Repository.GetDepotDirs(opts, "
To get dirs on the server that contain files synced to the current
client workspace:
GetDepotDirsCmdOptions opts =
new GetDepotDirsCmdOptions(GetDepotDirsCmdFlags.SyncedDirs, null);
IList<String> target = Repository.GetDepotDirs(opts, "
To get dirs on the server that fall under the path //depot/main/:
GetDepotDirsCmdOptions opts =
new GetDepotDirsCmdOptions(GetDepotDirsCmdFlags.None, null);
IList<String> target = Repository.GetDepotDirs(opts, "
See Also