B4J Question Paths Directory Assets and other Mysteries.

rgarnett1955

Active Member
Licensed User
Longtime User
Hi

I open up a map file viz:

Open Map File:
    'Read the file and see whether it has any key:value pairs

    dirString = GetCanonicalPath(File.DirAssets) 'For experimentation only
    
    map = File.ReadMap(File.DirAssets, configFileArg)
    
    If map.Size = 0 Then
        Return
    End If

The dirString var returns as: W:\MyProgramFiles_W\PowerMonProgs\pmonDB_uServerJRDC\jRDC_sqLite\jRDCv2_sqLite\Objects\AssetsDir

But there is no such directory on my hard drive.

But the correct map data is returned by the "map = File.ReadMap(File.DirAssets, configFileArg)"


This map file is in: W:\MyProgramFiles_W\PowerMonProgs\pmonDB_uServerJRDC\jRDC_sqLite\jRDCv2_sqLite\Files

I don't understand this.

Does anyone know how all this Java directory/path stuff works? It's driving me nuts.

Also does the File.ReadMap command close the file and unlock it in terms of Windows file locking when the File.ReadMap is completed?

Best regards
Rob
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Also does the File.ReadMap command close the file and unlock it in terms of Windows file locking when the File.ReadMap is completed?
Yes.

File.DirAssets is a virtual path. I don't see why it is driving you nuts. Just use File.DirAssets. Don't check if the file exists as you know it exists.
 
Upvote 0

rgarnett1955

Active Member
Licensed User
Longtime User
Yes.

File.DirAssets is a virtual path. I don't see why it is driving you nuts. Just use File.DirAssets. Don't check if the file exists as you know it exists.

Hi Erel,

That's well and good,

But how do I back up data in virtual paths Java if I don't know where they are?

What are the rules for the "virtualisation" of the path. There must be some. It can't just be random.

I like to know what's going on that's why it's driving me nuts.


Best regards
Rob
 
Upvote 0
Top