ClientLockFiles Method (Options, FileSpec)
|
Lock files
Namespace:
Perforce.P4
Assembly:
p4api.net (in p4api.net.dll) Version: 2024.2.269.3570
Syntaxpublic IList<FileSpec> LockFiles(
Options options,
params FileSpec[] files
)
Public Function LockFiles (
options As Options,
ParamArray files As FileSpec()
) As IList(Of FileSpec)
public:
IList<FileSpec^>^ LockFiles(
Options^ options,
... array<FileSpec^>^ files
)
member LockFiles :
options : Options *
files : FileSpec[] -> IList<FileSpec>
Parameters
- options
- Type: Perforce.P4Options
command options - files
- Type: Perforce.P4FileSpec
Array of files to lock
Return Value
Type:
IListFileSpeclist of locked files
Remarks
p4 help lock
lock -- Lock an open file to prevent it from being submitted
p4 lock [-c changelist#] [file ...]
The specified files are locked in the depot, preventing any user
other than the current user on the current client from submitting
changes to the files. If a file is already locked, the lock request
is rejected. If no file names are specified, all files in the
specified changelist are locked. If changelist number is omitted,
files in the default changelist are locked.
See Also