Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1   9.2    Statistic  

Archive.Content

Lists content of archive as JSON.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Archive 9.0 Yes Yes Yes Yes Yes
MBS( "Archive.Content"; Archive { ; Passphrase } )   More

Parameters

Parameter Description Example value
Archive Either container with archive or native file path. "C:\test\test.zip"
Passphrase Optional
Password to use.

Result

Returns JSON or error.

Description

Lists content of archive as JSON.
JSON has an entry count for the file count, an entry format for the format type and an entry for files array.

Examples

Check archive content:

Set Variable [ $list ; Value: MBS("Archive.Content"; If(IsEmpty($Path); $Container; $Path)) ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "Failed to read container" ; $list ]
Else
    Set Field [ $Content ; MBS("JSON.Colorize"; $list) ]
End If

Get content of encrypted archive:

MBS( "Archive.Content";
"/Users/cs/Desktop/invoices-2019-02-12_1924.zip"; /* path to archive (or container) */
"98234kjh245234" /* password */)

See also

Created 8th December 2018, last changed 12nd February 2019


Archive.Compress   -   Archive.Extract

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos