Share via


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)

Syntax

'Declaration
Public Shared Function Detect ( _
    path As String, _
    fileEncoding As String, _
    treatMissingFileAsBinary As Boolean, _
    <OutAttribute> ByRef failures As Failure() _
) As Integer
public static int Detect(
    string path,
    string fileEncoding,
    bool treatMissingFileAsBinary,
    out Failure[] failures
)
public:
static int Detect(
    String^ path, 
    String^ fileEncoding, 
    bool treatMissingFileAsBinary, 
    [OutAttribute] array<Failure^>^% failures
)
static member Detect : 
        path:string * 
        fileEncoding:string * 
        treatMissingFileAsBinary:bool * 
        failures:Failure[] byref -> int 
public static function Detect(
    path : String, 
    fileEncoding : String, 
    treatMissingFileAsBinary : boolean, 
    failures : Failure[]
) : int

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.

Return Value

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

Remarks

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

.NET Framework Security

See Also

Reference

FileType Class

Detect Overload

Microsoft.TeamFoundation.VersionControl.Client Namespace