Skip to content

Missing MOVE_FROM event #8

@markg85

Description

@markg85

Hi,

When you use inotifywait in the command line and just specify the 'move' event then you get the events for MOVE_FROM and MOVE_TO. Yet the library only outputs the MOVE_TO.

I probably get why you did that though. As you'd have to "collect" events to construct a nice array with:
[from: , to: ]

I think a "somewhat safe" implementation is to first wait listen to MOVE_FROM. Then if you get that, the next event must be matching on MOVE_TO. If not, ignore the previous event and handle this event as you currently do.

Imho, it would be a valuable addition to have as you then know which file moved from where. Right now you don't know anything, just that a file moved from 'somewhere' inside the folder you're monitoring.

What are your thoughts on this?

Cheers,
Mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions