Changes between Version 6 and Version 7 of PluginAPI/Padre_Hooks


Ignore:
Timestamp:
Mar 20, 2011, 2:49:04 PM (3 years ago)
Author:
Sewi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PluginAPI/Padre_Hooks

    v6 v7  
    1818Note2: The usage samples should give you a hint how a hook could be used. They may not be useful for other cases (like svn auto-commit). 
    1919 
     20== before_delete == 
     21 
     22|| Arguments || Padre::File object being deleted || 
     23|| Return value || undef or text || 
     24|| Called || before any file is removed from disk || 
     25|| Usage Example || protect important files from deletion || 
     26 
     27This hook should return undef if everything is ok. Any returned text is treated as an error message and shown to the user. The deletion process is stopped on the first hook returning an error message. 
     28Return an empty, but defined string will about delete but not show any error, use this only to override Padre's internal delete! 
     29 
     30== after_delete == 
     31 
     32|| Arguments || Deleted Padre::File object || 
     33|| Return value || ignored || 
     34|| Called || after any file has been removed from disk || 
     35|| Usage Example || svn delete || 
     36 
     37Notice: The file is already gone! The Padre::File object given as argument may do unusual things like returning a caches size even if the file doesn't exist any longer. 
     38 
    2039== before_save == 
    2140