Introspecting type "file" vs "filesystem object"

I was trying to figure out the best way to get the name (without extension) of a file, and my go-to is the Introspectors. Looking at the ‘properties of type “file”’ seems to be missing quite a few properties in the 9.5.2 debugger though -

q: version of client
A: 9.5.2.56
T: 0.294 ms
I: singular version

q: properties of type "file"
A: aol error of <file>: string
A: aol error time of <file>: time
A: size of <file>: integer
A: version of <file>: version
A: file version of <file>: version
A: product version of <file>: version
A: executable file format of <file>: string
A: windows checksum of <file>: integer
A: variables of <file>: string
A: security descriptor of <file>: security descriptor
A: content of <file>: file content
A: byte <integer> of <file>: integer
A: line <integer> of <file>: file line
A: lines of <file>: file line
A: lines starting with <string> of <file>: file line
A: lines containing <string> of <file>: file line
A: section <string> of <file>: file section
A: key <string> of <file>: string
A: md5 of <file>: string
A: sha1 of <file>: string
A: sha2_224 of <file>: string
A: sha2_256 of <file>: string
A: sha2_384 of <file>: string
A: sha2_512 of <file>: string
A: sha224 of <file>: string
A: sha256 of <file>: string
A: sha384 of <file>: string
A: sha512 of <file>: string
A: json of <file>: json value
A: shortcut of <file>: file shortcut
A: sqlite database of <file>: sqlite database
A: version block <string> of <file>: file version block
A: only version block of <file>: file version block
A: version block <integer> of <file>: file version block
A: version blocks of <file>: file version block
A: raw version block <string> of <file>: file version block
A: only raw version block of <file>: file version block
A: first raw version block of <file>: file version block
A: raw version block <integer> of <file>: file version block
A: raw version blocks of <file>: file version block
A: raw version of <file>: version
A: raw file version of <file>: version
A: raw product version of <file>: version
A: pem encoded certificate of <file>: x509 certificate
A: xml document of <file>: xml dom document
T: 0.441 ms
I: plural property

What happened to “name”? “pathname”? “parent folder”? These properties do still work, but aren’t listed by the Introspector…

Those are associated with a <filesystem object> :slight_smile:

Q: properties of type "filesystem object" A: ancestors of <filesystem object>: folder A: drive of <filesystem object>: drive A: modification time of <filesystem object>: time A: accessed time of <filesystem object>: time A: creation time of <filesystem object>: time A: readonly of <filesystem object>: boolean A: hidden of <filesystem object>: boolean A: system of <filesystem object>: boolean A: archive of <filesystem object>: boolean A: normal of <filesystem object>: boolean A: temporary of <filesystem object>: boolean A: compressed of <filesystem object>: boolean A: offline of <filesystem object>: boolean A: name of <filesystem object>: string A: pathname of <filesystem object>: string A: location of <filesystem object>: string A: parent folder of <filesystem object>: folder

Given the clue that you had (that something like ‘pathname’ should exist), you could do a search/find across all properties with that string:

Q: properties whose (it as string contains "pathname") A: pathname of <filesystem object>: string A: pathname of <registry key>: string A: pathname of <file shortcut>: string A: start in pathname of <file shortcut>: string A: icon pathname of <file shortcut>: string

(or you could always use developer.bigfix.com’s inspector search: https://developer.bigfix.com/relevance/search/?query=pathname)

1 Like

Yes there is an inheritance of types there. A <file> is a <filesystem object>. A <folder> is a <filesystem object> etc.

1 Like

Thanks for clearing that up!