commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hrjk" <har...@zeniitti.net>
Subject Re: [VFS] Can not access file share with latest nightly builds
Date Wed, 26 Apr 2006 07:11:48 GMT
> Hi!
>> For some reason following exception is thrown for directories on mapped
>> drives:
>> org.apache.commons.vfs.FileSystemException: Could not list the contents
>> of
>> "file:///O:/somefolder" because it is not a folder.
>>
> I dont have an idea.
> It would be great if you manage to set a breakpoint in
> org.apache.commons.vfs.provider.local.LocalFile around line 86 (first
> statement in method doGetType) and see where the "file" instance points
> to and which exit will be taken.

At the beginning of doGetType() method, file.exists() == false and
file.length == 0. So FileType.IMAGINARY is returned.

Following lists the file properties:

attached true
children null
content null
objects null
parent null
type null

name
 uri "file:////123.123.123.123/SomeShare$/SomeFolder"
 rootUri "file:////123.123.123.123/SomeShare$/"
 absPath "/SomeFolder"
 extension null
 scheme "file"
 baseName null

type
 hasAttrs true
 hasChildren false
 hasContent true
 name "file"

The FileSystemException is thrown from AbstractFileObject, in
getChildren() method:
  if (!type.hasChildren())
  {
    throw new
FileSystemException("vfs.provider/list-children-not-folder.error",
name);
  }

Hopefully this information tells you something.

-hrjk



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


Mime
View raw message