This documentation is archived and is not being maintained.

FileType::Detect Method (String, String, Boolean, array<Failure>%)

Determines the encoding of the specified file.

Namespace:  Microsoft.TeamFoundation.VersionControl.Client
Assembly:  Microsoft.TeamFoundation.VersionControl.Client (in Microsoft.TeamFoundation.VersionControl.Client.dll)

public:
static int Detect(
	String^ path, 
	String^ fileEncoding, 
	bool treatMissingFileAsBinary, 
	[OutAttribute] array<Failure^>^% failures
)

Parameters

path
Type: System::String

The path of the local file for which the encoding is unknown.

fileEncoding
Type: System::String

The encoding to try. Specify null for autodetection of encoding.

treatMissingFileAsBinary
Type: System::Boolean

True to treat the missing file as binary.

failures
Type: array<Microsoft.TeamFoundation.VersionControl.Client::Failure>%

Returns an array of failures that resulted from the detection.

Return Value

Type: System::Int32
The encoding for the file that is determined by this method.

Specify "auto" or null in fileEncoding to force autodetection.

Show: