IVsFileBackup2.BackupFileAsync(String) Method
Definition
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.
Backs up the file asynchronously.
public:
Microsoft::VisualStudio::Shell::Interop::IVsTask ^ BackupFileAsync(System::String ^ szBackupFileName);
public:
Microsoft::VisualStudio::Shell::Interop::IVsTask ^ BackupFileAsync(Platform::String ^ szBackupFileName);
Microsoft::VisualStudio::Shell::Interop::IVsTask BackupFileAsync(std::wstring const & szBackupFileName);
public Microsoft.VisualStudio.Shell.Interop.IVsTask BackupFileAsync (string szBackupFileName);
abstract member BackupFileAsync : string -> Microsoft.VisualStudio.Shell.Interop.IVsTask
Public Function BackupFileAsync (szBackupFileName As String) As IVsTask
Parameters
- szBackupFileName
- String
The backup file name.
Returns
The asynchronous task.
Remarks
This method asynchronously persists the object to a single file. It must not perform I/O on the UI thread, it must not prevent further change to the object while it is running, and it must persist the state the object had at the time it was called. It must not modify any internal state, but should record the fact that the current version has been backed up. BackupFileAsync() must return either E_STG_S_DATALOSS or STG_E_INVALIDCODEPAGE if it cannot persist to a file without data loss. BackupFileAsync() may return E_UNEXPECTED if it is called while a previous backup of the object is still in progress.