Sublime Forum

Detect when a new file is added to project

#1

Hi guys,

through a command I create a file somewhere in the project a new file, but I don’t know exactly where is the file (I create it with an external utility).
So I would listen when something new is added to project to check, if the new file is what I’m looking for, and open it.

I can’t find the right event to listen.
How can I do?

thank you :smile:

0 Likes

#2

If I can’t listen that event (as it seems), could at least open an existing file in project by passing only the filename?

0 Likes

#3

It should be possible to listen to write a Plugin for that, depending on the Operating System to use;
There are several filesystem-listener-Plugins for Python, but its not that easy to get them to work, if I recall correctly.
Google turned up several, but they all work differently and not for any OS.

0 Likes

#4

Are you willing to do it manually? Have you tried cmd+P?

0 Likes