Hi,

at the risk of being late: ;-)

Stuart Duckworth schrieb:

> On 4 Apr 2007 at 19:41, Bernd Eilers wrote:
> 
>> This seems to be a matter of missing slashes, eg. the first two in
>> file:// already belong to the scheme part of the URL and not to it´s
>> path.
>> 
>> Something like the following worked for me:
>> 
>> Sub FindFile()
>> Dim oFileAccess As Object
>> Dim rVal as Boolean
>> 
>>   Set oFileAccess =
>>   CreateUnoService("com.sun.star.ucb.SimpleFileAccess") 
>>   rVal = oFileAccess.exists("file://///Olympus/stuart/test.sxc")
>> 
>> End Sub
> 
> I have now tried that on the system and it still doesn't give a True 
> return on the network drive where the file exists.
> 
> I shall try a work-around using loadComponentFromURL() which should 
> return a NULL value where the file does not exist and which I know 
> will actually load a file from the network drive.
> 
> Thanks for your thoughts and help.
If "Olympus" is the host name I assume that usually you would access it
via the UNC path name "\\Olympus\stuart\test.sxc", right?

So the correct URL would be "file://Olympus/stuart/test.sxc".

The URL schema is

"file://hostname/Path/filename.extension"

In case of local files "hostname" is empty and so you get the well-known
three slashes as in "file:///d:/stuart/test.sxc".

Please mind that OOo can't cope with host names containing underscores
(as this is not conforming to relevant RFCs) that will change in OOo2.3.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to