IOfflineFilesCache2::RenameItemEx method (cscobj.h)

Renames an item in the cache. This method is identical to the IOfflineFilesCache::RenameItem method, except that it will attempt to do the rename operation right away.

Syntax

HRESULT RenameItemEx(
  [in] LPCWSTR pszPathOriginal,
  [in] LPCWSTR pszPathNew,
  [in] BOOL    bReplaceIfExists
);

Parameters

[in] pszPathOriginal

Fully qualified UNC path of the item (server, share, file or directory) to be renamed.

[in] pszPathNew

The new path to replace pszPathOriginal if the item that pszPathOriginal points to exists in the cache.

[in] bReplaceIfExists

This parameter is reserved for future use.

Return value

Returns S_OK if successful, or an error value otherwise.

Remarks

This method does not require system administrator privilege.

If the item to be renamed is a file or directory, it must obey the file system semantics for the rename operation. If the file or a child file (for a directory) is already open, the rename will fail. Also, this method attempts to perform the rename as long as the user has access to the item that is being renamed.

If you need to minimize the chance that the item is in use, call the IOfflineFilesCache::RenameItem method instead.

Requirements

Requirement Value
Minimum supported client Windows 7 with SP1
Minimum supported server Windows Server 2008 R2 with SP1
Target Platform Windows
Header cscobj.h
DLL CscSvc.dll; CscObj.dll

See also

IOfflineFilesCache2