You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Tom <tb...@tbee.org> on 2010/03/15 15:54:41 UTC
FTP findFiles vs FILE
Slowly making progress on using VFS for FTP access after all kinds of
exception that did not make sense.
Anyhow, I have a tree that shows a directory structure. If I specify
"file:///..." the contents of the filesystem is shown; specifically
findFiles loops into all childeren. If I only replace this with"ftp://..."
findFiles does no longer loop into its childeren; it only finds itself. So
that means that if I unfold a directory I see the same directory again,
unfold, same dir, unfold, same dir, ...
Why is the behavior for file: different from ftp:?
How do I find childeren of an FTP FileObject?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by James Carman <ja...@carmanconsulting.com>.
We would just have to make sure that the fix doesn't mess up support
for other more well-known FTP servers. Again, just attach a patch to
a JIRA and I'm sure someone will take a look at it.
On Wed, Mar 17, 2010 at 5:42 AM, Tom <tb...@tbee.org> wrote:
> The same issues for storeFileStream and appendFileStream with the same fix.
> I assume that the FTP server of Alfresco is the culprit.
>
> Tom
>
>
>
> On 2010-03-16 19:26, James Carman wrote:
>>
>> I would say open up a JIRA and someone will take a look at it. Make
>> sure you attach your patch and check the box that says you allow the
>> ASF to use your code (or whatever it says).
>>
>> On Tue, Mar 16, 2010 at 2:23 PM, Tom<tb...@tbee.org> wrote:
>>
>>>
>>> What are the chances of this patch (I can give you the code) being
>>> submitted
>>> to SVN? I'd rather not use a special VFS.
>>>
>>> Tom
>>>
>>>
>>>
>>> On 2010-03-16 7:28, Tom wrote:
>>>
>>>>
>>>> All I can say: I checked out the code from subversion, put a break point
>>>> in the FTP code, saw "Alfresco/Documents" come in as a parameter, that
>>>> was
>>>> handed over to the FTPClient and the method returned false to indicate
>>>> an
>>>> error. In a stand alone test of FTPClient I already noticed that handing
>>>> over a compound path did not work, so I add a split and a loop et voila;
>>>> the
>>>> code worked.
>>>>
>>>> It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
>>>> this works and it seems like a more compatible implementation.
>>>>
>>>> Tom
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by Tom <tb...@tbee.org>.
I did
http://forums.alfresco.com/en/viewtopic.php?f=46&t=25698
<http://forums.alfresco.com/en/viewtopic.php?f=46&t=25698>
I don't know if VFS's required behavior is according to the FTP specs or
a enhancement most FTP servers have implemented...
But getting Alfresco fixed seems a lot less likely than getting the
patch submitted to VFS.
All unittests ran fine...
It's just one class...
VFS is still in 2.0-SNAPSHOT...
https://issues.apache.org/jira/browse/VFS-304
:-)
Tom
On 2010-03-17 13:36, James Carman wrote:
> You might want to file a but with the Alfresco folks on this one.
> Their FTP server implementation should support paths and not just
> directory names for the CWD command. Everyone else does.
>
> On Wed, Mar 17, 2010 at 5:42 AM, Tom<tb...@tbee.org> wrote:
>
>> The same issues for storeFileStream and appendFileStream with the same fix.
>> I assume that the FTP server of Alfresco is the culprit.
>>
>> Tom
>>
>>
>>
>> On 2010-03-16 19:26, James Carman wrote:
>>
>>> I would say open up a JIRA and someone will take a look at it. Make
>>> sure you attach your patch and check the box that says you allow the
>>> ASF to use your code (or whatever it says).
>>>
>>> On Tue, Mar 16, 2010 at 2:23 PM, Tom<tb...@tbee.org> wrote:
>>>
>>>
>>>> What are the chances of this patch (I can give you the code) being
>>>> submitted
>>>> to SVN? I'd rather not use a special VFS.
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>>> On 2010-03-16 7:28, Tom wrote:
>>>>
>>>>
>>>>> All I can say: I checked out the code from subversion, put a break point
>>>>> in the FTP code, saw "Alfresco/Documents" come in as a parameter, that
>>>>> was
>>>>> handed over to the FTPClient and the method returned false to indicate
>>>>> an
>>>>> error. In a stand alone test of FTPClient I already noticed that handing
>>>>> over a compound path did not work, so I add a split and a loop et voila;
>>>>> the
>>>>> code worked.
>>>>>
>>>>> It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
>>>>> this works and it seems like a more compatible implementation.
>>>>>
>>>>> Tom
>>>>>
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by James Carman <ja...@carmanconsulting.com>.
You might want to file a but with the Alfresco folks on this one.
Their FTP server implementation should support paths and not just
directory names for the CWD command. Everyone else does.
On Wed, Mar 17, 2010 at 5:42 AM, Tom <tb...@tbee.org> wrote:
> The same issues for storeFileStream and appendFileStream with the same fix.
> I assume that the FTP server of Alfresco is the culprit.
>
> Tom
>
>
>
> On 2010-03-16 19:26, James Carman wrote:
>>
>> I would say open up a JIRA and someone will take a look at it. Make
>> sure you attach your patch and check the box that says you allow the
>> ASF to use your code (or whatever it says).
>>
>> On Tue, Mar 16, 2010 at 2:23 PM, Tom<tb...@tbee.org> wrote:
>>
>>>
>>> What are the chances of this patch (I can give you the code) being
>>> submitted
>>> to SVN? I'd rather not use a special VFS.
>>>
>>> Tom
>>>
>>>
>>>
>>> On 2010-03-16 7:28, Tom wrote:
>>>
>>>>
>>>> All I can say: I checked out the code from subversion, put a break point
>>>> in the FTP code, saw "Alfresco/Documents" come in as a parameter, that
>>>> was
>>>> handed over to the FTPClient and the method returned false to indicate
>>>> an
>>>> error. In a stand alone test of FTPClient I already noticed that handing
>>>> over a compound path did not work, so I add a split and a loop et voila;
>>>> the
>>>> code worked.
>>>>
>>>> It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
>>>> this works and it seems like a more compatible implementation.
>>>>
>>>> Tom
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by Tom <tb...@tbee.org>.
The same issues for storeFileStream and appendFileStream with the same
fix. I assume that the FTP server of Alfresco is the culprit.
Tom
On 2010-03-16 19:26, James Carman wrote:
> I would say open up a JIRA and someone will take a look at it. Make
> sure you attach your patch and check the box that says you allow the
> ASF to use your code (or whatever it says).
>
> On Tue, Mar 16, 2010 at 2:23 PM, Tom<tb...@tbee.org> wrote:
>
>> What are the chances of this patch (I can give you the code) being submitted
>> to SVN? I'd rather not use a special VFS.
>>
>> Tom
>>
>>
>>
>> On 2010-03-16 7:28, Tom wrote:
>>
>>> All I can say: I checked out the code from subversion, put a break point
>>> in the FTP code, saw "Alfresco/Documents" come in as a parameter, that was
>>> handed over to the FTPClient and the method returned false to indicate an
>>> error. In a stand alone test of FTPClient I already noticed that handing
>>> over a compound path did not work, so I add a split and a loop et voila; the
>>> code worked.
>>>
>>> It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
>>> this works and it seems like a more compatible implementation.
>>>
>>> Tom
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by James Carman <ja...@carmanconsulting.com>.
I would say open up a JIRA and someone will take a look at it. Make
sure you attach your patch and check the box that says you allow the
ASF to use your code (or whatever it says).
On Tue, Mar 16, 2010 at 2:23 PM, Tom <tb...@tbee.org> wrote:
> What are the chances of this patch (I can give you the code) being submitted
> to SVN? I'd rather not use a special VFS.
>
> Tom
>
>
>
> On 2010-03-16 7:28, Tom wrote:
>>
>> All I can say: I checked out the code from subversion, put a break point
>> in the FTP code, saw "Alfresco/Documents" come in as a parameter, that was
>> handed over to the FTPClient and the method returned false to indicate an
>> error. In a stand alone test of FTPClient I already noticed that handing
>> over a compound path did not work, so I add a split and a loop et voila; the
>> code worked.
>>
>> It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
>> this works and it seems like a more compatible implementation.
>>
>> Tom
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by Tom <tb...@tbee.org>.
What are the chances of this patch (I can give you the code) being
submitted to SVN? I'd rather not use a special VFS.
Tom
On 2010-03-16 7:28, Tom wrote:
> All I can say: I checked out the code from subversion, put a break
> point in the FTP code, saw "Alfresco/Documents" come in as a
> parameter, that was handed over to the FTPClient and the method
> returned false to indicate an error. In a stand alone test of
> FTPClient I already noticed that handing over a compound path did not
> work, so I add a split and a loop et voila; the code worked.
>
> It may be Alfresco's FTP server, it may be FTPClient, I don't know.
> But this works and it seems like a more compatible implementation.
>
> Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE bug
Posted by Tom <tb...@tbee.org>.
All I can say: I checked out the code from subversion, put a break point
in the FTP code, saw "Alfresco/Documents" come in as a parameter, that
was handed over to the FTPClient and the method returned false to
indicate an error. In a stand alone test of FTPClient I already noticed
that handing over a compound path did not work, so I add a split and a
loop et voila; the code worked.
It may be Alfresco's FTP server, it may be FTPClient, I don't know. But
this works and it seems like a more compatible implementation.
Tom
On 2010-03-15 22:51, James Carman wrote:
> I don't know if it's a bug or not. I can access this URL just fine:
>
> ftp://ftp.ncbi.nih.gov/gene/DATA/
>
> And, it has "gene/DATA" off the main server. So, the CWD stuff
> shouldn't be the problem. Here's my code:
>
> FileObject baseDir =
> VFS.getManager().resolveFile("ftp://ftp.ncbi.nih.gov/gene/DATA/");
> FileObject[] files = baseDir.getChildren();// baseDir.findFiles(new
> AllFileSelector());
> System.out.println("Found " + files.length + " files!");
>
> It works with either findFiles() or getChildren().
>
> On Mon, Mar 15, 2010 at 5:48 PM, Tom<tb...@tbee.org> wrote:
>
>> Naturally the better solution is to patch the changeWorkingDirectory method
>> in the FTPClientWrapper
>>
>> Tom
>>
>>
>>
>> On 2010-03-15 22:44, Tom wrote:
>>
>>> I found the problem: FTPClient cannot do a changeWorkingDirectory with
>>> multiple directories ("Alfresco/Documents"), you need to take it there
>>> step-by-step: first changeWorkingDirectory to "Alfresco", then
>>> changeWorkingDirectory to "Documents".
>>>
>>> A simple relPath.split("/") with a for loop solves it.
>>>
>>> Tom
>>>
>>>
>>>
>>>
>>>
>>> On 2010-03-15 22:04, Tom wrote:
>>>
>>>> And last but not least; accessing the FTP server using Apache Commons Net
>>>> FTPClient works fine as well. It really is something VFS does wrong.
>>>>
>>>> ftp://admin:admin@localhost/Alfresco/Documents
>>>>
>>>>
>>>>
>>>>
>>>> On 2010-03-15 21:23, Tom wrote:
>>>>
>>>>> Interestingly enough getChilderen() on the FTP returns an empty array,
>>>>> FILE returns the correct childeren, so rewriting it does not help much.
>>>>> Naturally I'm able to connect to the URL using Filezilla and it shows
>>>>> the childeren correctly.
>>>>>
>>>>>
>>>>>
>>>>> On 2010-03-15 17:41, Tom wrote:
>>>>>
>>>>>>>> On 2010-03-15 16:03, James Carman wrote:
>>>>>>>>
>>>>>>>>> Can you not just use getChildren()?
>>>>>>>>>
>>>>>>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Slowly making progress on using VFS for FTP access after all kinds
>>>>>>>>>> of
>>>>>>>>>> exception that did not make sense.
>>>>>>>>>>
>>>>>>>>>> Anyhow, I have a tree that shows a directory structure. If I
>>>>>>>>>> specify
>>>>>>>>>> "file:///..." the contents of the filesystem is shown;
>>>>>>>>>> specifically
>>>>>>>>>> findFiles loops into all childeren. If I only replace this
>>>>>>>>>> with"ftp://..."
>>>>>>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>>>>>>> itself.
>>>>>>>>>> So
>>>>>>>>>> that means that if I unfold a directory I see the same directory
>>>>>>>>>> again,
>>>>>>>>>> unfold, same dir, unfold, same dir, ...
>>>>>>>>>>
>>>>>>>>>> Why is the behavior for file: different from ftp:?
>>>>>>>>>> How do I find childeren of an FTP FileObject?
>>>>>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>>
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by James Carman <ja...@carmanconsulting.com>.
I don't know if it's a bug or not. I can access this URL just fine:
ftp://ftp.ncbi.nih.gov/gene/DATA/
And, it has "gene/DATA" off the main server. So, the CWD stuff
shouldn't be the problem. Here's my code:
FileObject baseDir =
VFS.getManager().resolveFile("ftp://ftp.ncbi.nih.gov/gene/DATA/");
FileObject[] files = baseDir.getChildren();// baseDir.findFiles(new
AllFileSelector());
System.out.println("Found " + files.length + " files!");
It works with either findFiles() or getChildren().
On Mon, Mar 15, 2010 at 5:48 PM, Tom <tb...@tbee.org> wrote:
> Naturally the better solution is to patch the changeWorkingDirectory method
> in the FTPClientWrapper
>
> Tom
>
>
>
> On 2010-03-15 22:44, Tom wrote:
>>
>> I found the problem: FTPClient cannot do a changeWorkingDirectory with
>> multiple directories ("Alfresco/Documents"), you need to take it there
>> step-by-step: first changeWorkingDirectory to "Alfresco", then
>> changeWorkingDirectory to "Documents".
>>
>> A simple relPath.split("/") with a for loop solves it.
>>
>> Tom
>>
>>
>>
>>
>>
>> On 2010-03-15 22:04, Tom wrote:
>>>
>>> And last but not least; accessing the FTP server using Apache Commons Net
>>> FTPClient works fine as well. It really is something VFS does wrong.
>>>
>>> ftp://admin:admin@localhost/Alfresco/Documents
>>>
>>>
>>>
>>>
>>> On 2010-03-15 21:23, Tom wrote:
>>>>
>>>> Interestingly enough getChilderen() on the FTP returns an empty array,
>>>> FILE returns the correct childeren, so rewriting it does not help much.
>>>> Naturally I'm able to connect to the URL using Filezilla and it shows
>>>> the childeren correctly.
>>>>
>>>>
>>>>
>>>> On 2010-03-15 17:41, Tom wrote:
>>>>>>>
>>>>>>> On 2010-03-15 16:03, James Carman wrote:
>>>>>>>>
>>>>>>>> Can you not just use getChildren()?
>>>>>>>>
>>>>>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>>>>>
>>>>>>>>> Slowly making progress on using VFS for FTP access after all kinds
>>>>>>>>> of
>>>>>>>>> exception that did not make sense.
>>>>>>>>>
>>>>>>>>> Anyhow, I have a tree that shows a directory structure. If I
>>>>>>>>> specify
>>>>>>>>> "file:///..." the contents of the filesystem is shown;
>>>>>>>>> specifically
>>>>>>>>> findFiles loops into all childeren. If I only replace this
>>>>>>>>> with"ftp://..."
>>>>>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>>>>>> itself.
>>>>>>>>> So
>>>>>>>>> that means that if I unfold a directory I see the same directory
>>>>>>>>> again,
>>>>>>>>> unfold, same dir, unfold, same dir, ...
>>>>>>>>>
>>>>>>>>> Why is the behavior for file: different from ftp:?
>>>>>>>>> How do I find childeren of an FTP FileObject?
>>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
Naturally the better solution is to patch the changeWorkingDirectory
method in the FTPClientWrapper
Tom
On 2010-03-15 22:44, Tom wrote:
> I found the problem: FTPClient cannot do a changeWorkingDirectory with
> multiple directories ("Alfresco/Documents"), you need to take it there
> step-by-step: first changeWorkingDirectory to "Alfresco", then
> changeWorkingDirectory to "Documents".
>
> A simple relPath.split("/") with a for loop solves it.
>
> Tom
>
>
>
>
>
> On 2010-03-15 22:04, Tom wrote:
>> And last but not least; accessing the FTP server using Apache Commons
>> Net FTPClient works fine as well. It really is something VFS does wrong.
>>
>> ftp://admin:admin@localhost/Alfresco/Documents
>>
>>
>>
>>
>> On 2010-03-15 21:23, Tom wrote:
>>> Interestingly enough getChilderen() on the FTP returns an empty
>>> array, FILE returns the correct childeren, so rewriting it does not
>>> help much.
>>> Naturally I'm able to connect to the URL using Filezilla and it
>>> shows the childeren correctly.
>>>
>>>
>>>
>>> On 2010-03-15 17:41, Tom wrote:
>>>>>> On 2010-03-15 16:03, James Carman wrote:
>>>>>>> Can you not just use getChildren()?
>>>>>>>
>>>>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>>>>
>>>>>>>> Slowly making progress on using VFS for FTP access after all
>>>>>>>> kinds of
>>>>>>>> exception that did not make sense.
>>>>>>>>
>>>>>>>> Anyhow, I have a tree that shows a directory structure. If I
>>>>>>>> specify
>>>>>>>> "file:///..." the contents of the filesystem is shown;
>>>>>>>> specifically
>>>>>>>> findFiles loops into all childeren. If I only replace this
>>>>>>>> with"ftp://..."
>>>>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>>>>> itself.
>>>>>>>> So
>>>>>>>> that means that if I unfold a directory I see the same
>>>>>>>> directory again,
>>>>>>>> unfold, same dir, unfold, same dir, ...
>>>>>>>>
>>>>>>>> Why is the behavior for file: different from ftp:?
>>>>>>>> How do I find childeren of an FTP FileObject?
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
I found the problem: FTPClient cannot do a changeWorkingDirectory with
multiple directories ("Alfresco/Documents"), you need to take it there
step-by-step: first changeWorkingDirectory to "Alfresco", then
changeWorkingDirectory to "Documents".
A simple relPath.split("/") with a for loop solves it.
Tom
On 2010-03-15 22:04, Tom wrote:
> And last but not least; accessing the FTP server using Apache Commons
> Net FTPClient works fine as well. It really is something VFS does wrong.
>
> ftp://admin:admin@localhost/Alfresco/Documents
>
>
>
>
> On 2010-03-15 21:23, Tom wrote:
>> Interestingly enough getChilderen() on the FTP returns an empty
>> array, FILE returns the correct childeren, so rewriting it does not
>> help much.
>> Naturally I'm able to connect to the URL using Filezilla and it shows
>> the childeren correctly.
>>
>>
>>
>> On 2010-03-15 17:41, Tom wrote:
>>>>> On 2010-03-15 16:03, James Carman wrote:
>>>>>> Can you not just use getChildren()?
>>>>>>
>>>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>>>
>>>>>>> Slowly making progress on using VFS for FTP access after all
>>>>>>> kinds of
>>>>>>> exception that did not make sense.
>>>>>>>
>>>>>>> Anyhow, I have a tree that shows a directory structure. If I
>>>>>>> specify
>>>>>>> "file:///..." the contents of the filesystem is shown;
>>>>>>> specifically
>>>>>>> findFiles loops into all childeren. If I only replace this
>>>>>>> with"ftp://..."
>>>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>>>> itself.
>>>>>>> So
>>>>>>> that means that if I unfold a directory I see the same directory
>>>>>>> again,
>>>>>>> unfold, same dir, unfold, same dir, ...
>>>>>>>
>>>>>>> Why is the behavior for file: different from ftp:?
>>>>>>> How do I find childeren of an FTP FileObject?
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
And last but not least; accessing the FTP server using Apache Commons
Net FTPClient works fine as well. It really is something VFS does wrong.
ftp://admin:admin@localhost/Alfresco/Documents
On 2010-03-15 21:23, Tom wrote:
> Interestingly enough getChilderen() on the FTP returns an empty array,
> FILE returns the correct childeren, so rewriting it does not help much.
> Naturally I'm able to connect to the URL using Filezilla and it shows
> the childeren correctly.
>
>
>
> On 2010-03-15 17:41, Tom wrote:
>>>> On 2010-03-15 16:03, James Carman wrote:
>>>>> Can you not just use getChildren()?
>>>>>
>>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>>
>>>>>> Slowly making progress on using VFS for FTP access after all
>>>>>> kinds of
>>>>>> exception that did not make sense.
>>>>>>
>>>>>> Anyhow, I have a tree that shows a directory structure. If I specify
>>>>>> "file:///..." the contents of the filesystem is shown;
>>>>>> specifically
>>>>>> findFiles loops into all childeren. If I only replace this
>>>>>> with"ftp://..."
>>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>>> itself.
>>>>>> So
>>>>>> that means that if I unfold a directory I see the same directory
>>>>>> again,
>>>>>> unfold, same dir, unfold, same dir, ...
>>>>>>
>>>>>> Why is the behavior for file: different from ftp:?
>>>>>> How do I find childeren of an FTP FileObject?
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
Interestingly enough getChilderen() on the FTP returns an empty array,
FILE returns the correct childeren, so rewriting it does not help much.
Naturally I'm able to connect to the URL using Filezilla and it shows
the childeren correctly.
On 2010-03-15 17:41, Tom wrote:
>>> On 2010-03-15 16:03, James Carman wrote:
>>>> Can you not just use getChildren()?
>>>>
>>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>>
>>>>> Slowly making progress on using VFS for FTP access after all kinds of
>>>>> exception that did not make sense.
>>>>>
>>>>> Anyhow, I have a tree that shows a directory structure. If I specify
>>>>> "file:///..." the contents of the filesystem is shown; specifically
>>>>> findFiles loops into all childeren. If I only replace this
>>>>> with"ftp://..."
>>>>> findFiles does no longer loop into its childeren; it only finds
>>>>> itself.
>>>>> So
>>>>> that means that if I unfold a directory I see the same directory
>>>>> again,
>>>>> unfold, same dir, unfold, same dir, ...
>>>>>
>>>>> Why is the behavior for file: different from ftp:?
>>>>> How do I find childeren of an FTP FileObject?
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
No; it's an Alfresco (www.alfresco.com) FTP access.
Tom
On 2010-03-15 17:04, James Carman wrote:
> I've used the filtering options with an FTP site before. Do you have
> code that goes against any public FTP sites that you can share with us
> that exhibits the behavior?
>
> On Mon, Mar 15, 2010 at 12:00 PM, Tom<tb...@tbee.org> wrote:
>
>> I can, however I would then need to apply my own filter and VFS supports
>> FileSelection...
>>
>> Tom
>>
>>
>> On 2010-03-15 16:03, James Carman wrote:
>>
>>> Can you not just use getChildren()?
>>>
>>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>>
>>>
>>>> Slowly making progress on using VFS for FTP access after all kinds of
>>>> exception that did not make sense.
>>>>
>>>> Anyhow, I have a tree that shows a directory structure. If I specify
>>>> "file:///..." the contents of the filesystem is shown; specifically
>>>> findFiles loops into all childeren. If I only replace this
>>>> with"ftp://..."
>>>> findFiles does no longer loop into its childeren; it only finds itself.
>>>> So
>>>> that means that if I unfold a directory I see the same directory again,
>>>> unfold, same dir, unfold, same dir, ...
>>>>
>>>> Why is the behavior for file: different from ftp:?
>>>> How do I find childeren of an FTP FileObject?
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>>> For additional commands, e-mail: user-help@commons.apache.org
>>>>
>>>>
>>>>
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by James Carman <ja...@carmanconsulting.com>.
I've used the filtering options with an FTP site before. Do you have
code that goes against any public FTP sites that you can share with us
that exhibits the behavior?
On Mon, Mar 15, 2010 at 12:00 PM, Tom <tb...@tbee.org> wrote:
> I can, however I would then need to apply my own filter and VFS supports
> FileSelection...
>
> Tom
>
>
> On 2010-03-15 16:03, James Carman wrote:
>>
>> Can you not just use getChildren()?
>>
>> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>>
>>>
>>> Slowly making progress on using VFS for FTP access after all kinds of
>>> exception that did not make sense.
>>>
>>> Anyhow, I have a tree that shows a directory structure. If I specify
>>> "file:///..." the contents of the filesystem is shown; specifically
>>> findFiles loops into all childeren. If I only replace this
>>> with"ftp://..."
>>> findFiles does no longer loop into its childeren; it only finds itself.
>>> So
>>> that means that if I unfold a directory I see the same directory again,
>>> unfold, same dir, unfold, same dir, ...
>>>
>>> Why is the behavior for file: different from ftp:?
>>> How do I find childeren of an FTP FileObject?
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by Tom <tb...@tbee.org>.
I can, however I would then need to apply my own filter and VFS supports
FileSelection...
Tom
On 2010-03-15 16:03, James Carman wrote:
> Can you not just use getChildren()?
>
> On Mon, Mar 15, 2010 at 10:54 AM, Tom<tb...@tbee.org> wrote:
>
>> Slowly making progress on using VFS for FTP access after all kinds of
>> exception that did not make sense.
>>
>> Anyhow, I have a tree that shows a directory structure. If I specify
>> "file:///..." the contents of the filesystem is shown; specifically
>> findFiles loops into all childeren. If I only replace this with"ftp://..."
>> findFiles does no longer loop into its childeren; it only finds itself. So
>> that means that if I unfold a directory I see the same directory again,
>> unfold, same dir, unfold, same dir, ...
>>
>> Why is the behavior for file: different from ftp:?
>> How do I find childeren of an FTP FileObject?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org
Re: FTP findFiles vs FILE
Posted by James Carman <ja...@carmanconsulting.com>.
Can you not just use getChildren()?
On Mon, Mar 15, 2010 at 10:54 AM, Tom <tb...@tbee.org> wrote:
> Slowly making progress on using VFS for FTP access after all kinds of
> exception that did not make sense.
>
> Anyhow, I have a tree that shows a directory structure. If I specify
> "file:///..." the contents of the filesystem is shown; specifically
> findFiles loops into all childeren. If I only replace this with"ftp://..."
> findFiles does no longer loop into its childeren; it only finds itself. So
> that means that if I unfold a directory I see the same directory again,
> unfold, same dir, unfold, same dir, ...
>
> Why is the behavior for file: different from ftp:?
> How do I find childeren of an FTP FileObject?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org