You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Jeffrey D. Brekke" <jb...@wi.rr.com> on 2006/10/17 18:25:21 UTC

[vfs] How to *not* create directories if the don't exist?

Is there a way in VFS to not create directories if they appear to not 
exist?  Using an ftp provider, there is a way to specify devices in the 
url, they don't exist in the directory listing, but you can get a stream 
from them.

ftp://some.vms_server.com/my$device/path1/path2/filename

Here my$device is akin to a drive letter in dos/windows. 
AbstractFileObject defines the template method that any directory not 
present should be created, but in this case we don't want to create the 
directory, just nav through it.

Is it possible to change this behavior programmitcally or through 
configuration?

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                     ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke               ekkerbj@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] How to *not* create directories if the don't exist?

Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Mario Ivankovits wrote:
> Hi Jeffrey!
>>> If its virtual, then no, it's not possible yet.
>>> Hmmm ... with some thoughts it should be possible, though.
> When we find a way how to solve this, it might be also a solution for
> the "hidden file" bug/enhancement.
> I just don't know how to do it best.
> 
> One way could be that we open the possibility to transform a virutal
> object to a file/folder manually, though, this seems to be a *very*
> strange solution.
> 
> Any additional idea is welcome ...

My only idea was a file system option to just skip the auto creation of 
folders when looking at the paths.  Just use them when this is on and 
don't attempt to create them.  Don't even verify they exist in the 
directory listing?

I think this equates to some system options honored in 
AbstractFileObject to skip the parent/folder traversal/creation stuff.

Or an alternative implementation of FileObject that does something like 
this?

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                     ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke               ekkerbj@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] How to *not* create directories if the don't exist?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Jeffrey!
>> If its virtual, then no, it's not possible yet.
>> Hmmm ... with some thoughts it should be possible, though.
When we find a way how to solve this, it might be also a solution for
the "hidden file" bug/enhancement.
I just don't know how to do it best.

One way could be that we open the possibility to transform a virutal
object to a file/folder manually, though, this seems to be a *very*
strange solution.

Any additional idea is welcome ...

Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] How to *not* create directories if the don't exist?

Posted by "Jeffrey D. Brekke" <jb...@wi.rr.com>.
Mario Ivankovits wrote:
> Hi Jeffrey!
>> Is there a way in VFS to not create directories if they appear to not
>> exist?
>>
>> ftp://some.vms_server.com/my$device/path1/path2/filename
> I guess my$device is a virtual folder which wont show up in a directory
> listing?

Yes, it doesn't show up in a directory listing.

It is useable by itself, I can store/retrieveFileStream() via FTPClient 
itself using /my$device/path1/path2/filename.

>> Is it possible to change this behavior programmitcally or through
>> configuration?
> If its virtual, then no, it's not possible yet.
> Hmmm ... with some thoughts it should be possible, though.

I *knew* there must be a way!;)

-- 
=====================================================================
Jeffrey D. Brekke                                   jbrekke@wi.rr.com
Wisconsin,  USA                                     brekke@apache.org
                                                     ekkerbj@yahoo.com
http://www.bloglines.com/blog/jbrekke               ekkerbj@gmail.com


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [vfs] How to *not* create directories if the don't exist?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Hi Jeffrey!
> Is there a way in VFS to not create directories if they appear to not
> exist?
>
> ftp://some.vms_server.com/my$device/path1/path2/filename
I guess my$device is a virtual folder which wont show up in a directory
listing?

> Is it possible to change this behavior programmitcally or through
> configuration?
If its virtual, then no, it's not possible yet.
Hmmm ... with some thoughts it should be possible, though.


Ciao,
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org