GetVirtualFilesJSON

Workflow data tools, Virtual files, ActiveX, DLL

Description

Returns the registered virtual files under a prefix together with the registry usage and limits

Syntax

ActiveX

Function PDFlib::GetVirtualFilesJSON(Prefix As String) As String

DLL

const wchar_t* DLGetVirtualFilesJSON(int InstanceID, const wchar_t* Prefix);
const char* DLGetVirtualFilesJSONA(int InstanceID, const char* Prefix);

Parameters

InstanceIDLibrary instance returned by DLCreateLibrary
PrefixName prefix such as mem://job-42/; an empty prefix lists every file

Return values

Returns a borrowed string that stays valid until a later call on the same instance; copy it at once, using DLStringResultLength for the wide function or DLAnsiStringResultLength for the ANSI function. A successful empty result is a valid empty string. Nil means the input was rejected; call GetWorkflowToolsError for the reason

Report

{"prefix":"mem://job-42/",
 "usage":{"bytes":167,"maxBytes":0,"files":1,"maxFiles":0},
 "files":[{"name":"mem://job-42/request.json","size":167,"revision":1}]}

Remarks

usage covers the whole registry; zero limits mean unlimited

Revisions increase whenever a file is created, replaced or restored

The virtual file registry is shared by every library instance in the process and is used by every mem:// path and by registered file names; scope workflow resources under a unique prefix

The ANSI function converts text using the instance's SetAnsiMode setting; use UTF-8 mode for non-ASCII data

ActiveX exposes this method on IPDFlibrary24; obtain it with CoPDFlibrary.CreateEditionTools24 or query the default interface of PDFlibAX 4.74 or later

All editions include these functions. Failed ActiveX calls return an empty string, 0 or Empty and record the reason for GetWorkflowToolsError. The C#, VB.NET and Visual C++ WorkflowTools examples in the DLL and ActiveX demo folders show a complete request, page plan and rollback workflow

See also

Workflow data tools · Virtual file registry · GetWorkflowToolsError