Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10438

Re: java.io.File

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: java.io.File
Date Fri, 2 Dec 2011 14:07:57 -0800 (PST)
Organization http://groups.google.com
Lines 29
Message-ID <3749375.667.1322863677698.JavaMail.geo-discussion-forums@preu18> (permalink)
References <lt6hd7h1agr1kb9vud97fpabja00p0pbtn@4ax.com> <1754083.312.1322839502470.JavaMail.geo-discussion-forums@prjr26> <4ed8fc62$0$10730$426a74cc@news.free.fr>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 2620:0:1000:fd2b:224:d7ff:fe69:5838
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1322863677 21762 127.0.0.1 (2 Dec 2011 22:07:57 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 2 Dec 2011 22:07:57 +0000 (UTC)
In-Reply-To <4ed8fc62$0$10730$426a74cc@news.free.fr>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:fd2b:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:10438

Show key headers only | View raw


Mayeul wrote:
>Lew wrote:
>> Mark wrote:
>>> Can a java.io.File object use a OS file descriptor?  I am trying to
>>> find the source of a fd leak in a[n] application.
>>
>> At some point, depending on the operations performed by the 'File' instance, there may be a file descriptor involved, and then the 'File' instance certainly does use it, at least indirectly via JVM system calls that proxy to OS system calls.
> 
> It was my understanding that java.io.File instances were merely 
> representations of pathnames, and are neither closed nor opened, just 
> places and names where files could exist or not.

How, then, do calls like 'File#canRead()', 'canWrite()', 'createNewFile()', 'createTempFile()', 'delete()', 'exists()', 'getFreeSpace()', 'isDirectory()', 'isFile()', 'list()', 'listFiles()', 'mkdir()', 'mkdirs()', 'setReadable()', 'setReadOnly()' and 'setWritable()' work?

> It was also my understanding that file descriptors were representations 
> of opened files.

Maybe those operations don't use file descriptors, but they do use OS filesystem resources.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 09:35 +0000
  Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 07:25 -0800
    Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 15:55 +0000
      Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 08:17 -0800
        Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-02 16:31 +0000
          Re: java.io.File markspace <-@.> - 2011-12-02 08:53 -0800
          Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:02 -0800
            Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 17:12 -0500
              Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:16 -0800
                Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 18:42 -0500
                Re: java.io.File Lars Enderin <lars.enderin@telia.com> - 2011-12-03 01:06 +0100
                Re: java.io.File Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-12-07 15:51 +0200
            Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-05 15:14 +0000
              Re: java.io.File markspace <-@.> - 2011-12-05 07:49 -0800
                Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-05 16:28 +0000
              Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-05 15:25 -0800
                Re: java.io.File Mark <i@dontgetlotsofspamanymore.net> - 2011-12-06 10:29 +0000
          Re: java.io.File Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 17:08 -0500
      Re: java.io.File Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 00:57 -0800
    Re: java.io.File Mayeul <mayeul.marguet@free.fr> - 2011-12-02 17:33 +0100
      Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-02 14:07 -0800
        Re: java.io.File Mayeul <mayeul.marguet@free.fr> - 2011-12-06 15:52 +0100
          Re: java.io.File Lew <lewbloch@gmail.com> - 2011-12-06 09:23 -0800

csiph-web