Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeff Higgins Newsgroups: comp.lang.java.programmer Subject: Re: A "current directory" concept for Java... Date: Sat, 23 Aug 2014 12:49:02 -0400 Organization: A noiseless patient Spider Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 23 Aug 2014 16:49:29 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="b896cb427f8c4d19d14880347aa9d6ce"; logging-data="32021"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/2KtbuTLkv+VNpuSz+hbx1F5yNk0F0tRw=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.7.0 In-Reply-To: Cancel-Lock: sha1:emlimrqOXmXwq8fMqM5ZsHodXlY= Xref: csiph.com comp.lang.java.programmer:29826 On 08/23/2014 11:32 AM, Andreas Leitgeb wrote: > Jeff Higgins wrote: "I had a look at the classes/interfaces in java.(n)io, but couldn't find such a class. Is it not there, or did I just miss it? " >> It seems to me that a "process" might have a notion of a >> "current directory". And that a file system "traverser" >> might have its notion of a "current directory". But any >> set of classes implementing a "virtual file system" wouldn't >> need the concept of a "current directory". May be that there >> is better place to "home" the abstraction. > > I'm afraid, I don't quite get the point of this nor your > other two posts in this thread. > You snipped the paragraph to which I responded. A class wrapping java.nio.file.Path, as you describe, is an odd choice for placement of a method to change a process' current working directory. If you have a chdir, why not a chroot? You may not need it, but if they were in a standard library someone would. Compare: sun.nio.fs.AixFileSystem sun.nio.fs.UnixFileSystem sun.nio.fs.WindowsFileSystem