abstract paths

Alan Snyder javalists at cbfiddle.com
Thu Jul 17 08:39:24 PDT 2008


The kind of abstractness I am referring to is lack of binding to a  
provider.

Consider two file systems of the same kind (e.g. Windows) accessed  
through different providers (native file system and FTP). The same  
fully qualified absolute path can be used in both cases, but the  
providers are different, so a regular Path will not work.


On Jul 17, 2008, at 8:17 AM, Mark Thornton wrote:

> Alan Snyder wrote:
>> It is not obvious to me that abstract pathnames are meaningful only  
>> for relative path names. No argument has been made to justify this  
>> claim.
> The syntax for the root of a path is file system specific, so any  
> abstractness is blown whenever the root is included. So an absolute  
> path can only really be applied to a system with a compatible file  
> system, in which case why not just use the regular path?
>
>>
>> 2. Copying a file from one file system to another could use the  
>> same absolute path for both the source and the destination. A  
>> current example of copying between two file systems (providers)  
>> would be mirroring files onto an FTP host.
> Usually you send the path relative to some place on the source  
> system and resolve it relative to a different path on the  
> destination system. If you are mirroring between identical systems  
> then you don't need an AbstractPath as a regular Path will work.
>
> Mark Thornton




More information about the nio-discuss mailing list