2024-08-20 21:40:07 +08:00
|
|
|
|
import{_ as e,o as n,c as t,e as a}from"./app-CkqL16TZ.js";const r={},o=a(`<h3 id="def-debounce-wait-any-none" tabindex="-1"><a class="header-anchor" href="#def-debounce-wait-any-none"><span><em><strong>def</strong></em> <code>debounce(wait: Any) -> None</code></span></a></h3><p>防抖函数</p><h3 id="def-on-file-system-event-directories-tuple-str-recursive-bool-event-filter-filter-func-callable-callback-func-callback-func" tabindex="-1"><a class="header-anchor" href="#def-on-file-system-event-directories-tuple-str-recursive-bool-event-filter-filter-func-callable-callback-func-callback-func"><span><em><strong>def</strong></em> <code>on_file_system_event(directories: tuple[str], recursive: bool, event_filter: FILTER_FUNC) -> Callable[[CALLBACK_FUNC], CALLBACK_FUNC]</code></span></a></h3><p>注册文件系统变化监听器</p><p>Args:</p><pre><code>directories: 监听目录们
|
|
|
|
|
</code></pre><h3 id="def-decorator-func-any-none" tabindex="-1"><a class="header-anchor" href="#def-decorator-func-any-none"><span><em><strong>def</strong></em> <code>decorator(func: Any) -> None</code></span></a></h3><h3 id="def-decorator-func-callback-func-callback-func" tabindex="-1"><a class="header-anchor" href="#def-decorator-func-callback-func-callback-func"><span><em><strong>def</strong></em> <code>decorator(func: CALLBACK_FUNC) -> CALLBACK_FUNC</code></span></a></h3><h3 id="def-wrapper-none" tabindex="-1"><a class="header-anchor" href="#def-wrapper-none"><span><em><strong>def</strong></em> <code>wrapper() -> None</code></span></a></h3><h3 id="def-wrapper-event-filesystemevent-none" tabindex="-1"><a class="header-anchor" href="#def-wrapper-event-filesystemevent-none"><span><em><strong>def</strong></em> <code>wrapper(event: FileSystemEvent) -> None</code></span></a></h3><h3 id="class-codemodifiedhandler-filesystemeventhandler" tabindex="-1"><a class="header-anchor" href="#class-codemodifiedhandler-filesystemeventhandler"><span><em><strong>class</strong></em> <code>CodeModifiedHandler(FileSystemEventHandler)</code></span></a></h3><p>Handler for code file changes</p><h3 id="def-on-modified-self-event-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-modified-self-event-any-none"><span> <em><strong>def</strong></em> <code>on_modified(self, event: Any) -> None</code></span></a></h3><p> </p><h3 id="def-on-created-self-event-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-created-self-event-any-none"><span> <em><strong>def</strong></em> <code>on_created(self, event: Any) -> None</code></span></a></h3><p> </p><h3 id="def-on-deleted-self-event-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-deleted-self-event-any-none"><span> <em><strong>def</strong></em> <code>on_deleted(self, event: Any) -> None</code></span></a></h3><p> </p><h3 id="def-on-moved-self-event-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-moved-self-event-any-none"><span> <em><strong>def</strong></em> <code>on_moved(self, event: Any) -> None</code></span></a></h3><p> </p><h3 id="def-on-any-event-self-event-any-none" tabindex="-1"><a class="header-anchor" href="#def-on-any-event-self-event-any-none"><span> <em><strong>def</strong></em> <code>on_any_event(self, event: Any) -> None</code></span></a></h3><p> </p><h3 id="var-liteyuki-bot-get-bot" tabindex="-1"><a class="header-anchor" href="#var-liteyuki-bot-get-bot"><span><em><strong>var</strong></em> <code>liteyuki_bot = get_bot()</code></span></a></h3><h3 id="var-observer-observer" tabindex="-1"><a class="header-anchor" href="#var-observer-observer"><span><em><strong>var</strong></em> <code>observer = Observer()</code></span></a></h3><h3 id="var-last-call-time-none" tabindex="-1"><a class="header-anchor" href="#var-last-call-time-none"><span><em><strong>var</strong></em> <code>last_call_time = None</code></span></a></h3><h3 id="var-code-modified-handler-codemodifiedhandler" tabindex="-1"><a class="header-anchor" href="#var-code-modified-handler-codemodifiedhandler"><span><em><strong>var</strong></em> <code>code_modified_handler = CodeModifiedHandler()</code></span></a></h3><h3 id="var-current-time-time-time" tabindex="-1"><a class="header-anchor" href="#var-current-time-time-time"><span><em><strong>var</strong></em> <code>current_time = time.time()</code></span></a></h3><h3 id="var-last-call-time-current-time" tabindex="-1"><a class="header-anchor" href="#var-last-call-time-current-time"><span><em><strong>var</strong></em> <code>last_call_time = current_time</code></span></a></h3>`,30),l=[o];function d(i,s){return n(),t("div",null,l)}const f=e(r,[["render",d],["__file","observer.html.vue"]]),v=JSON.parse('{"path":"/en/dev/api/dev/observer.html","title":"liteyuki.dev.observer","lang":"en-US","frontmatter":{"title":"liteyuki.dev.observer","order":1,"icon":"laptop-code","category":"API","description":"def debounce(wait: Any) -> None 防抖函数 def on_file_system_event(directories: tuple[str], recurs
|