Skip to content

  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us

Customization – Wizard SDK

  • 1. What is a Wizard
  • 2. Introduction to Wizard Javascript API Calls
  • 2.1 Integration
  • 2.2 Document signing
  • 2.3 PDF Document Processing
  • 2.4 Device Features
  • 2.5 Files & Folders
  • 2.6 Application Features
  • 2.7 System Utilities
  • 3. Example: Simple process

Customization – PDF & Form Preparation

  • PDF Forms creation
  • 1. Tags
  • 2. Acrofields
  • 3. Sample document

Integration – REST API

  • 1. Introduction
  • 2. Download
  • 3. Upload

Integration – App-to-App

  • 1. Introduction
  • 2. How does it work?
  • 3. START-ACTIVITY-FOR-RESULT (APP – SIGNATUS – APP)
  • 4. Sending data to Master Wizard via Intent
  • 5. Runtime Configuration Parameters (Display, Fields, Signing Process)

Hardware

  • 1. Android
  • 2. iOS / iPadOS
  • 3. Windows

Signatus user manual

  • 1. Introduction
  • 2. Main menu
  • 3. Signing
  • 4. Submit signed document
  • 5. Settings in detail
  • 6. Example Wizard
View Categories
  • Home
  • Documentation
  • Mobile App - Signatus
  • Customization – Wizard SDK
  • 2.5 Files & Folders

2.5 Files & Folders

The Files & Folders section provides APIs for managing files and folder structures.
It supports creating, reading, updating, and deleting files and folders, as well as listing and organizing their contents.

These operations enable structured document storage and file management within the application.

createFolder (Android, Windows, iOS) #

Creates a new folder within a workspace directory and returns the value true if successful.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the create folder is successful, false otherwise.
 */
function createFolder(arg);

Parameters description :

NameRequiredFormatDescription
foldertruestringfolder name

Example :


const arg = {
    "folder": "final"
};
const isSucess = createFolder(arg);

createFolders   (Android, Windows, iOS) #

Creates multiple new folders within workspace directory and returns the value true if successful.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the create folders is successful, false otherwise.
 */
function createFolders(arg);

Parameters description :

NameRequiredFormatDescription
folderstrueJSON ArrayArray of folder names

Example :


const arg = {
    "folders": ["final","temp"]
};
const isSucess = createFolders(arg);

deleteFolder (Android, Windows, iOS) #

Deletes the specified folder within workspace directory along with all files and subfolders it contains.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the delete folder is successful, false otherwise.
 */
function deleteFolder(arg);

Parameters description :

NameRequiredFormatDescription
foldertruestringFolder name

Example :


const arg = {
    "folder": "final"
};
const isSucess = deleteFolder(arg);

deleteFolders (Android, Windows, iOS) #

Deletes the specified folders within workspace directory along with all files and subfolders they contain.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the delete folders is successful, false otherwise.
 */
function deleteFolders(arg);

Parameters description :

NameRequiredFormatDescription
folderstrueJSON ArrayArray of folder names

Example :


const arg = {
    "folders": ["final","temp"]
};
const isSucess = deleteFolders(arg);

deleteFile (Android, Windows, iOS) #

Deletes the file specified by the input file path and returns true if the operation is successful.
If the channel parameter is provided, the file is deleted from the specified channel.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the delete is successful, false otherwise.
 */
function deleteFile(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringPath to the target PDF file within the workspace.
channelfalsestringChannel name
callfalsestringCallback function name

Example :


const arg = {
    "file": "Test1.pdf",
    "channel": "MyDocuments",
    "call" : "onDelete"
};
deleteFile(arg);

/**
 * callback function for deleteFile
 *
 * @param {string} res - The response string to be parsed as JSON.
 */
function onDelete (res) {
    const result = JSON.parse(res);
}

Result example :

{
	"parameter": {
		"status": "OK",
		"message": "",
		"data": true
	}
}

listDir (Android, iOS) #

Creates a JSON array containing the list of files in the specified folder.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {Object} - Returns JSON Array of files in the folder
 */
function listDir(arg);

Parameters description :

NameRequiredFormatDescription
foldertruestringFolder path within workspace dir

Example :


const arg = {
    "folder" : "/pdf"
};
const result = listDir(arg);

Result example :

[
	{
		"name": "Test1.pdf",
		"path": "/pdf/Test1.pdf",
		"length": "25605"
	},
	{
		"name": "Test2.pdf",
		"path": "/pdf/Test2.pdf",
		"length": "25605"
	}
]

copy  (Android, Windows, iOS) #

Copies a file to the specified folder.
Note: This function works only within the wizard workspace. To move a file to a local channel, use the saveToLocalChannel function instead.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the copy is successful, false otherwise.
 */
function copy(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringPath to the file within the workspace.
foldertruestringDestination folder name

Example :


const arg = {
    "file": "pdf/Test1.pdf",
    "folder": "final",
};
const isSucces = copy(arg);

saveToLocalChannel (Android) #

Saves a file to a local channel directory (in settings labeled as a “Browse device storage”).

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {void} 
 */
function saveToLocalChannel(arg);

Parameters description :

NameRequiredFormatDescription
pathtruestringPath to the file within the workspace.
nametruestringFile name
channeltruestringLocal channel name
calltruestringCallback funkcion name
datafalsestringAdditional file metadata

Example :


const arg = {
    "path" : "/pdf/Test1.pdf",
    "filename" : "Test1.pdf",
    "channel" : "Samples",
    "call" : "onSave"
};
saveToLocalChannel(arg);

/**
 * callback function for saveToLocalChannel function
 * @param res - result in string format
 */
function onSave(res) {
    const result = JSON.parse(res);
}

Result example :

{
	"parameter": {
		"data": {
			"filename": "Test1.pdf",
			"path": "/data/user/0/com.anasoft.signatus.app/files/WorkSpace/pdf/Test1.pdf"
		},
		"status": "OK",
		"message": "File saved"
	}
}

move (Android, Windows, iOS) #

Moves a file to the specified folder.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the move is successful, false otherwise.
 */
function move(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringPath to the file within the workspace.
foldertruestringDestination folder name

Example :


const arg = {
    "file": "pdf/Test1.pdf",
    "folder": "final",
};
const isSucces = move(arg);

rename (Android) #

Changes the name of the defined file.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the rename is successful, false otherwise.
 */
function rename(arg);

Parameters description :

NameRequiredFormatDescription
pathtruestringPath to the file within the workspace.
nametruestringNew file name

Example :


const arg = {
    "path": "pdf/Test1.pdf",
    "name": "Renamed.pdf",
};
const isSucces = rename(arg);

saveText (Android, Windows, iOS) #

Creates a text file containing the text passed in as a string.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the save is successful, false otherwise.
 */
function saveText(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringPath to the text file within the workspace.
texttruestringText file content

Example :


const arg = {
    "file": "/text/testFile.txt",
    "text": "Test text content",
};
const isSucces = saveText(arg);

loadFile (Android, Windows, iOS) #

Reads a text file and returns it as a String.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {string} - Returns text file content
 */
function loadFile(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringFile path within workspace dir

Example :


const arg = {
    "file" : "/text/testFile.txt"
};
const text = loadFile(arg);

filesToJson (Android, iOS) #

Reads the specified binary files and converts them into a single JSON file containing the Base64-encoded contents of each source file. This is useful for integrations where only one JSON file can be transmitted.

/**
 * @param {Object} arg- Parameter JSON object.
 * @returns {boolean} - Returns true if the create is successful, false otherwise.
 */
function filesToJson(arg);

Parameters description :

NameRequiredFormatDescription
filetruestringPath to the target json file within the workspace.
listtrueJSON ArrayArray of JSON Objects with attributes respective to each source file
list.pathtruestringPath to a source file within the workspace
list.nametruestringName to identify the file in the resulting JSON
list.idfalsestringUnique id of source file

const arg = {
	"file": "base64.json",
	"list": [
		{
			"name": "Test1",
			"path": "/pdf/Test1.pdf"
		},
		{
			"name": "Test2",
			"path": "/pdf/Test2.pdf"
		}
	]
};
boolean isSucess = filesToJson(arg);

base64.json example :

[
	{
		"name": "Test1",
		"data" : "YWJjZGVmZ2g="
	},
	{
		"name": "Test2",
		"data" : "aWprbG1ub3A="
	}
]
Updated on 04/02/2026
2.4 Device Features2.6 Application Features
Table of Contents
  • createFolder (Android, Windows, iOS)
  • createFolders   (Android, Windows, iOS)
  • deleteFolder (Android, Windows, iOS)
  • deleteFolders (Android, Windows, iOS)
  • deleteFile (Android, Windows, iOS)
  • listDir (Android, iOS)
  • copy  (Android, Windows, iOS)
  • saveToLocalChannel (Android)
  • move (Android, Windows, iOS)
  • rename (Android)
  • saveText (Android, Windows, iOS)
  • loadFile (Android, Windows, iOS)
  • filesToJson (Android, iOS)
  • Documentation
    • Mobile App – Signatus
    • Web App – Signatus 2 API
    • Web App – OKdokument API
    • Web App – OKdokument
  • Contact Us
Proudly powered by WordPress