Re: tasklist file

Petr Kuzel <[email protected]> Sat, 25 Dec 2004 19:54:31 +0100
Newsgroups gmane.comp.java.netbeans.modules.tasklist.devel
Message-ID <[email protected]>
Vincent Brabant wrote:

> Can someone indicates me the name and path of the file containing the
> tasks ?

        if (name == null) {
            name = Settings.getDefault().getExpandedFilename();
        }
        File fname = new File(name);
        
        if (!fname.exists()) {
            // Not an error - you may not have saved tasks yet            
            // Perhaps we have just upgraded? Look in the old place
            name = System.getProperty("netbeans.user") +  // NOI18N
            File.separatorChar + "system" + File.separatorChar +
            "TaskList" + File.separatorChar + "tasklist.ics"; // NOI18N
            fname = new File(name);

where settings default is:

DefaultFilename={userdir}{/}tasklist.ics


> I would like to update that file via a ant task.

Please test carefully. I expect that current code assumes
file exclusive ownership. There are import/export actions
that should be used instead of direct file manipulation.
  
  Cc.