Skip to content

Latest commit

 

History

History
386 lines (193 loc) · 9.64 KB

PyGFileOperationProgressSink.md

File metadata and controls

386 lines (193 loc) · 9.64 KB

PyGFileOperationProgressSink

PyGFileOperationProgressSink Object

Implement-only gateway for IFileOperationProgressSink,

used to receive events from a PyIFileOperation object.

To abort the operation, an implementation of any method can raise a

com_error with an appropriate HRESULT.

Methods

FinishOperations(Result) Called after all actions have been performed

Parameters

  • Result : int

    HRESULT of last operation performed

PauseTimer() Not implemented, according to MSDN

PostCopyItem(Flags, Item, DestinationFolder, NewName, hrCopy, NewlyCreated) Called after each copy operation

Parameters

  • Flags : int

    Flags specifying copy behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    The original item

  • DestinationFolder : PyIShellItem

    Folder into which it was copied

  • NewName : str

    Name of item after copy, may be mangled in case of name conflict

  • hrCopy : int

    HRESULT of the copy operation

  • NewlyCreated : PyIShellItem

    Shell interface of the copy

PostDeleteItem(Flags, Item, hrDelete, NewlyCreated) Called after each delete operation

Parameters

  • Flags : int

    Flags specifying delete behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    Item that was deleted

  • hrDelete : int

    HRESULT of the delete operation

  • NewlyCreated : PyIShellItem

    Item in the recycle bin, or None if deleted without recycling

PostMoveItem(Flags, Item, DestinationFolder, NewName, hrMove, NewlyCreated) Called after each move operation

Parameters

  • Flags : int

    Flags specifying move behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    Interface of the item before it was moved

  • DestinationFolder : PyIShellItem

    The folder into which it was moved

  • NewName : str

    Name of item in its new location, may be mangled in case of conflict

  • hrMove : int

    HRESULT of the move operation

  • NewlyCreated : PyIShellItem

    Shell interface of the item in its new location

PostNewItem(Flags, DestinationFolder, NewName, TemplateName, FileAttributes, hrNew, NewItem) Called after each new file is created

Parameters

  • Flags : int

    Flags specifying creation behaviour, combination of shellcon.TSF_* flags

  • DestinationFolder : PyIShellItem

    Folder in which item was created

  • NewName : str

    Name of created item, may be mangled if file name conflicts occurred

  • TemplateName : str

    Template file used to initialize new item

  • FileAttributes : int

    File attributes of new item

  • hrNew : int

    HRESULT of the create operation

  • NewItem : PyIShellItem

    Shell interface of created item

PostRenameItem(Flags, Item, NewName, hrRename, NewlyCreated) Called after each file rename

Parameters

  • Flags : int

    Flags specifying rename behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    Shell interface of item before rename

  • NewName : str

    The new name of the item, may be mangled to resolve filename conflicts

  • hrRename : int

    HRESULT of the rename operation

  • NewlyCreated : PyIShellItem

    Shell interface of the item after rename

PreCopyItem(Flags, Item, DestinationFolder, NewName) Called before each copy operation

Parameters

  • Flags : int

    Flags specifying copy behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    The item to be copied

  • DestinationFolder : PyIShellItem

    Folder into which it will be copied

  • NewName : str

    Name to be given to the copy, will be None if keeping original name

PreDeleteItem(Flags, Item) Called before each delete operation

Parameters

  • Flags : int

    Flags specifying delete behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    Item to be deleted

PreMoveItem(Flags, Item, DestinationFolder, NewName) Called before each move operation

Parameters

  • Flags : int

    Flags specifying move behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    The item to be moved

  • DestinationFolder : PyIShellItem

    The folder into which it will be moved

  • NewName : str

    Name of moved item, may be None if not to be changed

PreNewItem(Flags, DestinationFolder, NewName) Called before each new file is created

Parameters

  • Flags : int

    Flags specifying creation behaviour, combination of shellcon.TSF_* flags

  • DestinationFolder : PyIShellItem

    Folder where item will be created

  • NewName : str

    Name of item to be created

PreRenameItem(Flags, Item, NewName) Called before each file rename

Parameters

  • Flags : int

    Flags specifying copy behaviour, combination of shellcon.TSF_* flags

  • Item : PyIShellItem

    Shell interface of the copied item

  • NewName : str

    New display name of the item

ResetTimer() Not implemented, according to MSDN

ResumeTimer() Not implemented, according to MSDN

StartOperations() Called as operation begins, before any modifications are done

UpdateProgress(WorkTotal, WorkSoFar) Gives an estimate of total work completed

Parameters

  • WorkTotal : int

    Undimensioned number representing total amount of work

  • WorkSoFar : int

    Undimensioned number representing amount already completed