Mailinglist Archive: opensuse (795 mails)

< Previous Next >
Re: [opensuse] KDE and directories
On Tue, Nov 7, 2017 at 11:59 AM, Per Jessen <per@xxxxxxxxxxxx> wrote:
Roger Oberholtzer wrote:

I think I know the answer to this (and Google was no help), but I
thought I would ask in case I messed something very obvious:

Is it possible to have KDE run a program when you enter a directory?
Say in Dolphin. We want to sense if the current directory contains a
file with a specific name. If so, do something. The point is that it
should be automatic. And it must be done for all directories. There is
no name rule or pattern that can be used.

I presume entering means changing current working directory to <some
directory>.
Monitoring that sounds like a job for inotify - but I am not sure if
changing current working directory is a filesystem event.

How is the file created? It might be better to monitor all directories
for a user and only look for that file being created or updated.

The file is updated independent of this. It contains status
information about the data in that directory. This status information
should be used to update a map (Navit) to reflect the status of the
data in that directory. It only applies to the current directory. So a
cron job is not appropriate. It must be triggered by the user entering
the directory.




--
Roger Oberholtzer

--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >