read file without dialog

Is it possible to read a file without the Open File Dialog?

I’ve tried this but it shows the dialog anyway

var theFile =  "/MyHardDisk /Users/irene/myDocument.doc"
var rawData = plugins.file.readFile(theFile);

Hi Irene,

It will show a Open File dialog when the path is invalid.
Your path in your code has a space in it, is this correct ?

Hope this helps.

Sorry Robert, it is my typing, in my method the path is correct.

I’ve tried also this:

“/MyHardDisk/Users/irene/myDocument.doc”
/MyHardDisk/Users/irene/myDocument.doc
/Users/irene/myDocument.doc
“/Users/irene/myDocument.doc”

but none of them are right.

I’m not sure what is an absolute path for a Mac in Servoy.
If I do :

var theFile = plugins.file.showFileOpenDialog();
application.output(theFile.getAbsolutePath());

the result is this:

/Users/irene/myDocument.doc

If I beleve the refGuide it should be this:

/MyHardDisk/Users/irene/myDocument.doc

Confusing

I just tested it in 3.5.5 and it works correctly.

Also the path “/Users/irene/myDocument.doc” means the path on the boot disk.
So the volume name (disk name) is not needed.
If you want to use the volume name as well you need to use

“/Volumes/MyHardDisk/irene/myDocument.doc”

Hope this helps.

Thank you, you solved my problem. It works fine now