🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #300

Re: monitoring directory tree changes

#300
From: John McGrath [TeamB]
Date: Fri, 02 Jan 2004 05:29
21 lines
1796 bytes
On 12/31/2003 at 10:08:49 PM, gary wrote:

> even so, i'd rather do it in a way that was more generic.  in C, i'd
> probably just traverse directories doing stat() calls and looking at
> timestamps, but i don't know java enough to know its file system
> features yet, so i'll have to look into a rough equivalent to this C
> library call.

See the java.io.File class.  You can list the contents of a directory
with the list() or listFiles() methods on a File object that refers to
a directory.  You can get attributes of a file using methods such as
lastModified(), canRead(), canWrite(), and length().

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <3ff50fd7@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3FF24822.90104@cordelli.net> <3ff34c61$1@newsgroups.borland.com> <3FF38F41.401@cordelli.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,760bdf7d8953e8c9
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2004-01-01 22:39:24 PST
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Subject: Re: monitoring directory tree changes
Newsgroups: borland.public.jbuilder.java.api
References: <3FF24822.90104@cordelli.net> <3ff34c61$1@newsgroups.borland.com> <3FF38F41.401@cordelli.net>
User-Agent: XanaNews/1.15.7.4
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 141.151.21.107
Message-ID: <3ff50fd7@newsgroups.borland.com>
Date: 1 Jan 2004 22:29:43 -0700
X-Trace: newsgroups.borland.com 1073024983 141.151.21.107 (1 Jan 2004 22:29:43 -0700)
Lines: 21
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!diablo.theplanet.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail