RepositoryGetFiles Method (Options, FileSpec)
|
Return a list of Files in the depot that correspond to the passed-in
FileSpecs.
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.1.261.8274
Syntaxpublic IList<File> GetFiles(
Options options,
params FileSpec[] filespecs
)
Public Function GetFiles (
options As Options,
ParamArray filespecs As FileSpec()
) As IList(Of File)
public:
IList<File^>^ GetFiles(
Options^ options,
... array<FileSpec^>^ filespecs
)
member GetFiles :
options : Options *
filespecs : FileSpec[] -> IList<File>
Parameters
- options
- Type: Perforce.P4Options
- filespecs
- Type: Perforce.P4FileSpec
Return Value
Type:
IListFile
Remarks
p4 help files
files -- List files in the depot
p4 files [ -a ] [ -A ] [ -e ] [ -m max ] file[revRange] ...
p4 files -U unloadfile ...
List details about specified files: depot file name, revision,
file, type, change action and changelist number of the current
head revision. If client syntax is used to specify the file
argument, the client view mapping is used to determine the
corresponding depot files.
By default, the head revision is listed. If the file argument
specifies a revision, then all files at that revision are listed.
If the file argument specifies a revision range, the highest revision
in the range is used for each file. For details about specifying
revisions, see 'p4 help revisions'.
The -a flag displays all revisions within the specific range, rather
than just the highest revision in the range.
The -A flag displays files in archive depots.
The -e flag displays files with an action of anything other than
deleted, purged or archived. Typically this revision is always
available to sync or integrate from.
The -m flag limits files to the first 'max' number of files.
The -U option displays files in the unload depot (see 'p4 help unload'
for more information about the unload depot).
Examples
To get Files in local depot //depot/...:
GetDepotFilesCmdOptions opts =
new GetDepotFilesCmdOptions(GetDepotFilesCmdFlags.None, 0);
FileSpec fs = new FileSpec(new DepotPath("//depot/..."), null);
IList<File> target = Repository.GetFiles(opts, fs);
To get Files in unload depot //Unloaded/...:
GetDepotFilesCmdOptions opts =
new GetDepotFilesCmdOptions(GetDepotFilesCmdFlags.InUnloadDepot, 0);
FileSpec fs = new FileSpec(new DepotPath("//Unloaded/..."), null);
IList<File> target = Repository.GetFiles(opts, fs);
See Also