Example using Java API call to check the hidden attribute.
B4X:
'Returns true if the hidden file attribute is set. Requires the Javaobject library.'Note: If file not found, then false is returned.'Example <code>:'Dim f As String = File.DirApp & "\fileishidden.txt"'Log(f & "=" & FileIsHidden(f)) ' filepath=true</code>
Sub FileIsHidden(Path As String) As BooleanDim fileO As JavaObject
fileO.InitializeNewInstance("java.io.File", ArrayAs Object(Path))
Return fileO.RunMethod("isHidden", Null)
EndSub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.