Android Question jFile Watcher: What are the values you can use in the second argument?

rgarnett1955

Active Member
Licensed User
Longtime User
Hi,

I want to get all of the file attributes for a selected file using JFileWatcher.

The example shows

Example:
Dim m As Map = f.CheckArbitraryAttribute(File.Combine(File.DirApp,"test.txt"),"dos:system")
Log(m)

The example uses dos:system.

What are the other ones ?

Is there any way of determining them without referring to the forum?

Best Regards
Rob
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

rgarnett1955

Active Member
Licensed User
Longtime User
Are you sure this B4J Library does work in Android?

It is maybe using this Api https://docs.oracle.com/javase/tutorial/essential/io/notification.html
You may google for Documentation about it.


Hi Don, Thanks for that. I had a quick look, but I didn't dfind a list of them, but in the end I just guessed the usual suspects.

See Code Below:

File Attribute names:
'======================================================================================================
public Sub FileAttributes(f As String, fAttrArg As FileAttr_t)
    
    Dim fw As FileWatcher ...

        ...
        attrMap                        = fw.CheckArbitraryAttribute(pathNameSel & "\" & fileNameSel, "dos:readonly")
        fAttrArg.readOnly            = attrMap.GetValueAt(0)
        
        attrMap                        = fw.CheckArbitraryAttribute(pathNameSel & "\" & fileNameSel, "dos:system")
        fAttrArg.system                = attrMap.GetValueAt(0)

        attrMap                        = fw.CheckArbitraryAttribute(pathNameSel & "\" & fileNameSel, "dos:archive")
        fAttrArg.archived            = attrMap.GetValueAt(0)
        
        attrMap                        = fw.CheckArbitraryAttribute(pathNameSel & "\" & fileNameSel, "dos:hidden")
        fAttrArg.hidden                = attrMap.GetValueAt(0)

I will do a bit more digging in that link you sent me.

Best regards
Rob
 
Upvote 0
Top