Click or drag to resize

EditCmdOptions Constructor

Options for the edit command

Namespace:  Perforce.P4
Assembly:  p4api.net (in p4api.net.dll) Version: 2023.2.255.3501
Syntax
public EditCmdOptions(
	EditFilesCmdFlags flags,
	int changeList,
	FileType fileType
)

Parameters

flags
Type: Perforce.P4EditFilesCmdFlags
changeList
Type: SystemInt32
fileType
Type: Perforce.P4FileType

Return Value

Type: 
Remarks

p4 help edit

edit -- Open an existing file for edit

p4 edit [-c changelist#] [-k -n] [-t filetype] file ...

Open an existing file for edit. The server records the fact that
the current user has opened the file in the current workspace, and
changes the file permission from read-only to read/write.

If -c changelist# is included, the file opened in the specified
pending changelist. If changelist number is omitted, the file is
opened in the 'default' changelist.

If -t filetype is specified, the file is assigned that Perforce
filetype. Otherwise, the filetype of the previous revision is reused.
If a partial filetype is specified, it is combined with the current
filetype.For details, see 'p4 help filetypes'.
Using a filetype of 'auto' will cause the filetype to be chosen
as if the file were being added, that is the typemap will be
considered and the file contents may be examined.

The -n flag previews the operation without changing any files or
metadata.

The -k flag updates metadata without transferring files to the
workspace. This option can be used to tell the server that files in
a client workspace are already editable, even if they are not in the
client view. Typically this flag is used to correct the Perforce
server when it is wrong about the state of files in the client
workspace, but incorrect use of this option can result in inaccurate
file status information.

'p4 edit' is not supported for files with propagating attributes
from an edge server in a distributed environment.

See Also