Partager via


IEditorOperations.InsertFile(String) Method

Definition

Inserts a file on disk into the text buffer.

public:
 bool InsertFile(System::String ^ filePath);
public:
 bool InsertFile(Platform::String ^ filePath);
bool InsertFile(std::wstring const & filePath);
public bool InsertFile (string filePath);
abstract member InsertFile : string -> bool
Public Function InsertFile (filePath As String) As Boolean

Parameters

filePath
String

The path of the file on disk.

Returns

true if the edit succeeded, otherwise false.

Exceptions

filePath is null.

filePath is a zero-length string, contains only white space, or contains one or more invalid characters as defined by InvalidPathChars.

The specified path, file name, or both exceed the system-defined maximum length. For example, on Windows-based platforms, paths must be less than 248 characters, and file names must be less than 260 characters.

The specified path is invalid (for example, it is on an unmapped drive).

An I/O error occurred while opening the file.

filePath specified a file that is read-only, or this operation is not supported on the current platform, or filePath specified a directory, or the caller does not have the required permission.

The file specified in filePath was not found.

filePath is in an invalid format.

The caller does not have the required permission.

Applies to