__/ [ munish.nr@xxxxxxxxx ] on Friday 14 July 2006 12:34 \__
> Hi,
>
> I am developing an application on Linux environment. My application is
> opening a file(say X) and read some configurations parameters from it
> and closing the file X and doing some functional processing. In the
> meantime if user modified/change the file X , then my application
> should reopen the file X and agan reading the parameters and working
> furhter.
>
> now the problem how my application will come to know that the file has
> been modified or chaged.
>
> Does nybody knows how i can make my application know that teh
> particular file has beem changed.
>
> I will really appreciate an email with comments form you!
>
> Thanks,
> Munish Nayyar
Which programming language are you using? You can get access to the timestamp
on the file, which indicates when it was last modified. If you look at the
source code of Kate (KDE editor), you may be able to re-use. Kate prompts
the user to re-open the file if a change is detected to have occurred
elsewhere. Other methods of handling this situation involve CVS, Subversion
or locking of files.
Hope it helps...
|
|