RunningDocumentTable.SaveFileIfDirty(String) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Saves the specified file if it has changed since the last save.
public:
System::String ^ SaveFileIfDirty(System::String ^ fullPath);
public:
Platform::String ^ SaveFileIfDirty(Platform::String ^ fullPath);
std::wstring SaveFileIfDirty(std::wstring const & fullPath);
public string SaveFileIfDirty (string fullPath);
member this.SaveFileIfDirty : string -> string
Public Function SaveFileIfDirty (fullPath As String) As String
- fullPath
- String
[in] The full path to the document to be saved.
The path to which the file was saved. This is either the original path or a new path specified by the user.
This method attempts to use the IVsPersistDocData2 interface from the document to save the document. If the IVsPersistDocData2 interface cannot be obtained from the document then the original path is returned. If the save fails for any reason or the document is not dirty, then the original path is returned. If the save succeeds, the path to which the document was saved is returned. In other words, there is no way to determine from this method if the document was saved or not.