Skip to content

Commit

Permalink
rename FSMonitor → FSEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
koehlma committed Dec 28, 2015
1 parent 77f9103 commit a5f6ddd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- [ ] better error handling (exceptions for every status code)
- [ ] auto destroy on exception in constructor
- [ ] rename FSMonitor to FSEvent (FSEvent → FSEvents)
- [x] rename FSMonitor to FSEvent (FSEvent → FSEvents)
- [ ] better docstrings
- [ ] more and better unittests
- [ ] complete support of all libuv features
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

.. currentmodule:: uv

:class:`FSMonitor` -- fs monitor handle
=======================================
:class:`FSEvent` -- fs event handle
===================================


.. autoclass:: uv.FSMonitor
.. autoclass:: uv.FSEvent
:members:
:member-order: bysource

.. autoclass:: uv.FSEvent
.. autoclass:: uv.FSEvents
:members:
:member-order: bysource

Expand Down
2 changes: 1 addition & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Contents:
handles/tty
handles/udp

handles/fs_monitor
handles/fs_event
handles/fs_poll


Expand Down
2 changes: 1 addition & 1 deletion uv/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
from .handles.tty import *
from .handles.udp import *

from .handles.fs_monitor import *
from .handles.fs_event import *
from .handles.fs_poll import *

from .dns import Address, Address4, Address6, AddrInfo
Expand Down
8 changes: 4 additions & 4 deletions uv/handles/fs_monitor.py → uv/handles/fs_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from .. import common, error, handle, library
from ..library import ffi, lib

__all__ = ['FSMonitor', 'FSEventFlags', 'FSEvent']
__all__ = ['FSEventFlags', 'FSEvents', 'FSEvent']


class FSEventFlags(common.Enumeration):
Expand Down Expand Up @@ -65,7 +65,7 @@ class FSEventFlags(common.Enumeration):
"""


class FSEvent(common.Enumeration):
class FSEvents(common.Enumeration):
""" """
RENAME = lib.UV_RENAME
"""
Expand All @@ -90,7 +90,7 @@ def uv_fs_event_cb(uv_fs_event, c_filename, events, status):


@handle.HandleType.FS_EVENT
class FSMonitor(handle.Handle):
class FSEvent(handle.Handle):
"""
FS handles monitor a given path for changes, for example, if the
file was renamed or there was a generic change in it. This handle
Expand All @@ -114,7 +114,7 @@ class FSMonitor(handle.Handle):

def __init__(self, path=None, flags=0, loop=None, on_event=None):
self.uv_fs_event = ffi.new('uv_fs_event_t*')
super(FSMonitor, self).__init__(self.uv_fs_event, loop)
super(FSEvent, self).__init__(self.uv_fs_event, loop)
self.path = path
"""
Path to be monitored.
Expand Down

0 comments on commit a5f6ddd

Please sign in to comment.