Docs
ServoyCloudSupportSamplesOpen SourceCommunity
  • Home
  • GUIDES
    • Platform Overview
    • Get Servoy
    • Get Started
      • Chapter 0
      • Chapter 1
      • Chapter 2
      • Chapter 3
      • Chapter 4
      • Chapter 5
    • Get Help
      • SuLA Instructions
      • SuLA Terms
    • Develop
      • Application Design
        • Forms
          • Layout Management
            • Simple Layout
            • Fully Responsive
              • Bootstrap 12-Grid
              • Flexbox
              • Custom Div
              • Collapsible Container
              • Simple Collapsible
              • Center Container
              • Inline Group Container
            • Abstract Form
          • Form Containers
            • Form Container
            • Tab Panel
            • Split Pane
            • Collapse
            • Accordion Panel
            • Form Component
            • List Form Component
          • Form Inheritance
          • Form Components
        • UI Components
          • Buttons and Text
            • Badge
            • Button
            • Data Label
            • Dropdown
            • Image
            • Label
          • Grids
            • Data Grid
            • Power Grid
            • Table
          • Input Controls
            • Calendar
            • Calendar Inline
            • Checkbox
            • Choice Group
            • Combobox
            • Group Buttons
            • Html Area
            • Input Group
            • Rating
            • Slider
            • Switch
            • Spinner
            • TextArea
            • Textbox
            • TextBoxGroup
            • Type Ahead
            • select2tokenizer
          • Media
            • Carousel
            • Embedded YouTube
            • File upload
            • Image label
            • Lightbox Gallery
            • MultiFile Upload
            • PDF JS Viewer
            • PDF Viewer
          • Mobile
            • Native Data List
            • Native Select
          • Navigation
            • Breadcrumbs
            • Navbar
            • sidenav
          • Visualization
            • DBTreeview
            • Progress Bar
            • Treeview
            • ChartJS
              • Data Labels Plugin
              • Funnel Chart
              • OutLabels Plugin
              • TreeMap
          • Specialized Components
            • Smart Document Editor
            • Servoy PDF Viewer
            • Fullcalendar Component
              • Fullcalendar
              • Fullcalendar Events
              • Migrating calendar from Smart and Web client to NG client
            • Fullcalendar Component 2
            • Canvas
            • Google Charts
            • Google Maps
            • svySignature
            • svywebcam
        • Styling and Themes
          • Default Theme Properties
          • CSS / LESS
          • Component Variants
          • Font Icons
        • Data Modeling
          • Databases
            • Tables
              • Columns
              • Calculations
              • Aggregations
              • Methods
              • Events / Triggers
              • Table security
            • Views
            • Procedures
          • Relations
          • Value Lists
          • Menus
          • In-Memory Databases
          • View Datasource
        • Modular Design
      • Programming Guide
        • Scripting the UI
          • Scripting Forms
          • Interacting with Components
          • Navigation
          • Windows, Dialogs and Popups
          • Events Manager
        • Working with Data
          • Concepts
          • Loading
          • Sorting
          • Iterating
          • Searching
            • Find mode
            • Query Builder
            • SQL String
          • Filtering
          • Editing
          • Validation
        • Automation and Scheduling
          • Batch Processor
          • Headless API
          • Scheduler API
        • Creating REST APIs
        • Consuming Webservices
        • Working with Files
          • File Plugin Basics
          • Images
          • Excel
          • PDF
          • JSON
        • Browser Utilities
          • Notifications
            • Web Notifications (Toastr)
            • Web Notifications (Native)
            • Block UI
          • Session Management
          • Keyboard Utilities
          • NG Utils
        • Sending and Receiving Email
        • Servoy Jasper Reports
          • Input Type
          • Display Mode
          • Output format
          • Jaspe Reports Viewer
        • Extensions
          • Modules
            • svyPhonegap
              • First Use Guide
              • Barcode Scanner
              • Browser
              • Camera
              • File
              • Fingerprint
              • Location
              • Network Interface
              • Phonegap
              • Printer
              • Push Notifications
            • svyAPI
              • Getting Started
            • svyLookup
              • Custom Templates
              • API Documentation
              • svyLookup v1
                • API Documentation v1.0.0
                • Base Form svyLookupTable v1.0.0
                • Base Form AbstractLookup v1.0.0
            • svyNavigation
              • API Documentation
                • API svyNavigation
                • API svyNavigationHistory
                • API svyNavigationUX
            • svyPopupFilter
              • Simple Filter Pickers
              • Custom Templates
              • API Documentation
                • API svyToolbarFilter
                • API svyPopupFilter
              • API Documentation v1
                • API svyToolbarFilter v1
                • API svyPopupFilter v1
            • svySearch
            • svySecurity
              • Overview
              • Token-based Auth and SSO (NEW!)
              • API Documentation
              • Getting Started
              • Tenant replication
              • Security Management Console
                • Classic Security Management Console
              • svySecurityUX
              • svyProperties
              • API Doc svyProperties
            • svyUtils
              • Log Manager
              • Log Manager Appenders
              • Smart Doc Editor Utils
              • Custom Dialogs
              • Excel Utils
                • Full API Reference
              • Crypto Utils
      • Security
        • Authentication
        • Permissions
          • UI Permissions
          • Data Permissions
          • Runtime Permissions
        • Audit Logging
        • OAuth
        • JWT
      • Multi-Language Support
      • Mobile Development
        • Getting Started
        • Mobile Design
        • Native Mobile Integrations
        • Building a Native Binary for the App Store
      • Native Desktop Development
        • NGDesktop UI plugin
        • NGDesktop Utils
        • NGDesktop File Plugin
    • Deploy
      • WAR Deployment
      • Docker Deployment
      • Server Configuration
        • Server Settings
        • Server Plugins
        • Database Servers
          • Locks
          • Transactions
          • Oracle
          • SQLServer
        • Client Sessions
        • Batch Processors
        • License Management
        • Monitoring
          • Server Log
          • Browser Console Log
          • Websocket Log
          • Query Performance
          • Client Performance
          • Client Event Tracing
          • Monitoring Servoy with JMX
      • NGClient deployment
      • Troubleshooting
      • Other Topics
        • Security: Cross-site Scripting
        • Running in an iFrame
    • Extend
    • Contribute
  • Reference
    • Servoy Core
      • Object Model
        • Database Server
          • Table
            • Column
            • Calculation
            • Method
            • Aggregation
          • View
          • Procedure
        • Solution
          • Form
          • Form Component
          • Relation
          • Relation Item
          • Table Node
          • Value List
          • Menu
          • Menu item
          • In-Memory Data Source
          • View Foundset Data Source
          • Variable
          • Column Info
          • Media
          • Layout Container
          • Method
        • i18n Message Key
      • Developer API
        • Globals
        • Forms
          • RuntimeForm
            • controller
            • containers
              • RuntimeContainer
            • elements
              • Component
              • RuntimeAccordionPanel
              • RuntimeBean
              • RuntimeButton
              • RuntimeCalendar
              • RuntimeCheck
              • RuntimeCombobox
              • RuntimeComponent
              • RuntimeDataButton
              • RuntimeDataLabel
              • RuntimeGroup
              • RuntimeHtmlArea
              • RuntimeImageMedia
              • RuntimeInsetList
              • RuntimeLabel
              • RuntimeListBox
              • RuntimePassword
              • RuntimePortal
              • RuntimeRadio
              • RuntimeChecks
              • RuntimeRadios
              • RuntimeRectangle
              • RuntimeRtfArea
              • RuntimeSpinner
              • RuntimeSplitPane
              • RuntimeTabPanel
              • RuntimeTextArea
              • RuntimeTextField
              • RuntimeWebComponent
        • JS Lib
          • Array
          • BigInt
          • Boolean
          • Date
          • Function
          • IterableValue
          • Iterator
          • JSON
          • Map
          • Set
          • Math
          • Namespace
          • Number
          • Object
          • Promise
          • QName
          • RegExp
          • Special Operators
          • Statements
          • String
          • XML
          • XMLList
        • Application
          • APPLICATION_TYPES
          • CLIENTDESIGN
          • DRAGNDROP
          • ELEMENT_TYPES
          • LOGGINGLEVEL
          • NGCONSTANTS
          • UICONSTANTS
          • CSSPosition
          • JSDimension
          • JSDNDEvent
          • JSEvent
          • JSLogger
          • JSLogBuilder
          • JSPoint
          • JSUpload
          • JSWindow
          • JSBounds
          • Renderable
          • UUID
        • SolutionModel
          • ALIGNMENT
          • ANCHOR
          • BEVELTYPE
          • CURSOR
          • DEFAULTS
          • FONTSTYLE
          • MEDIAOPTION
          • PAGEORIENTATION
          • PRINTSLIDING
          • SCROLLBAR
          • TITLEJUSTIFICATION
          • TITLEPOSITION
          • UNITS
          • JSBean
          • JSButton
          • JSCalculation
          • JSComponent
          • JSDataSourceNode
          • JSField
          • JSForm
          • JSLabel
          • JSMedia
          • JSMethod
          • JSPart
          • JSPortal
          • JSRelation
          • JSRelationItem
          • JSStyle
          • JSTab
          • JSTabPanel
          • JSValueList
          • JSVariable
          • JSTitle
          • JSChecks
          • JSCombobox
          • JSHeader
          • JSInsetList
          • JSList
          • JSPassword
          • JSRadios
          • JSText
          • JSTextArea
          • JSWebComponent
          • JSLayoutContainer
        • Database Manager
          • QUERY_COLUMN_TYPES
          • SQL_ACTION_TYPES
          • JSColumn
          • JSDataSet
          • JSBaseRecord
          • JSBaseSqlRecord
          • JSBaseFoundset
          • JSBaseSQLFoundset
          • JSFoundSet
          • JSFoundSetUpdater
          • JSRecord
          • JSRecordMarker
          • JSRecordMarkers
          • JSTable
          • JSTableFilter
          • MenuFoundSet
          • MenuItemRecord
          • QBAggregate
          • QBAggregates
          • QBCase
          • QBCaseWhen
          • QBColumn
          • QBColumns
          • QBCondition
          • QBFunction
          • QBFunctions
          • QBGroupBy
          • QBJoin
          • QBJoins
          • QBLogicalCondition
          • QBParameter
          • QBParameters
          • QBPart
          • QBResult
          • QBSearchedCaseExpression
          • QBSelect
          • QBSort
          • QBSorts
          • QBTableClause
          • QBWhereCondition
          • ViewFoundSet
          • ViewRecord
        • Events Manager
          • EVENTS_AGGREGATION_TYPES
          • EventType
        • Menus
          • JSMenu
          • JSMenuItem
        • JSMenuDatasource
        • Utils
        • Client Utils
          • JSBlobLoaderBuilder
        • History
        • Security
        • i18n
        • ServoyException
          • DataException
        • JSUnit
        • Datasources
          • DBDataSource
          • DBDataSourceServer
          • JSConnectionDefinition
          • JSDataSource
          • MemDataSource
          • MenuDataSource
          • SPDataSource
          • SPDataSourceServer
          • ViewDataSource
        • JSViewDatasource
        • servoyDeveloper
        • enum
    • Extensions
      • UI Components
        • Buttons and Text
          • Badge
          • Button
          • Data Label
          • Drop Down
          • Image
          • Label
        • Form Containers
          • Accordion Panel
          • Collapse
          • Form Container
          • Form Component Container
          • List Form Component
          • Default Loading Indicator
          • Error Bean
          • Portal
          • Responsive Container
          • Servoy Default Navigator
          • Slider
          • Split Pane
          • TabPanel
        • Grids
          • Data Grid
          • Power Grid
          • Table
        • Input Controls
          • Calendar
          • Calendar Inline
          • Checkbox
          • Choice Group
          • Combobox
          • Floatinglabel Calendar
          • Floatinglabel Combobox
          • Floatinglabel Textarea
          • Floatinglabel Textbox
          • Floatinglabel Type Ahead
          • Group Buttons
          • Html Area
          • Input Group
          • Rating
          • Select2tokenizer
          • Slider
          • Spinner
          • Switch
          • TextArea
          • TextBox
          • TextBox Group
          • Type Ahead
        • Media
          • Carousel
          • Embedded YouTube
          • File upload
          • Image label
          • Lightbox Gallery
          • MultiFile Upload
          • PDF JS Viewer
          • PDF Viewer
        • Mobile
          • Native Data List
          • Native Select
        • Navigation
          • Breadcrumbs
          • Navbar
          • sidenav
        • SmartDocEditor
          • Smart Document Editor
        • Visualization
          • Canvas
          • Chart
          • Custom List
          • DBTreeview
          • Foundset List
          • Fullcalendar
          • Gauge
          • Google Maps
          • Kanban
          • Progress Bar
          • Treeview
      • Server Plugins
        • amortization
          • AmortizationCalculation
          • Polynomial
        • clientmanager
          • Broadcaster
          • JSClientInformation (cm)
        • excelxport
        • file
          • JSFile
          • JSProgressMonitor
        • headlessclient
          • JSClient
        • http
          • HTTP_STATUS
          • Cookie
          • DeleteRequest
          • GetRequest
          • HeadRequest
          • HttpClient
          • HttpClientConfig
          • OptionsRequest
          • PostRequest
          • PutRequest
          • Response
          • TraceRequest
          • PatchRequest
          • JSFileUpload
        • images
          • JSImage
        • jwt
          • Algorithm
          • Builder
          • JWTClaims
        • mail
          • Attachment
          • MailMessage
        • maintenance
          • JSClientInformation
          • JSColumnObject
          • JSServer
          • JSTableObject
        • mobileservice
          • OfflineDataDescription
        • oauth
          • ClientAuthentication
          • CustomApiBuilder
          • OAuthProviders
          • OAuthRequest
          • OAuthResponse
          • OAuthResponseBinary
          • OAuthResponseJSON
          • OAuthResponseText
          • OAuthService
          • OAuthServiceBuilder
          • OAuthTokenExtractors
          • RequestType
        • pdf_output
        • rawSQL
        • RestWs plugin
        • rest_ws
          • WsContents
          • WsCookie
          • WsRequest
          • WsResponse
        • scheduler
        • serialize
        • textxport
          • DataProviderExport
          • TabExporter
        • udp
          • JSPacket
        • XmlReader
          • XmlNode
      • Browser Plugins
        • Block UI
        • Block UI (ref)
        • Dialogs Plugin
        • Idle
        • Idle (ref)
        • Key Listener
        • Key Listener (ref)
        • NGDesktop File
        • NGDesktop File (ref)
        • NGDesktop UI (ref)
        • NGDesktop Utils (ref)
        • NG Utils (ref)
        • Office Javascript API for Servoy
        • Phonegap
        • Web Notifications (Native)
        • Web Notifications (Toastr)
        • Window Plugin
        • Font Awesome
      • Modules
        • Smart Doc Editor Utils
        • svyAPI
          • Getting Started
        • svyLookup
          • Custom Templates
          • API Documentation
          • svyLookup v1
            • API Documentation v1.0.0
            • Base Form svyLookupTable v1.0.0
            • Base Form AbstractLookup v1.0.0
        • svyLookupExample
        • svyNavigation
          • API Documentation
            • API svyNavigation
            • API svyNavigationHistory
            • API svyNavigationUX
        • svyNavigationUX
        • svyNavigationUXSample
        • svyPopupFilter
          • Simple Filter Pickers
          • Custom Templates
          • API Documentation
            • API svyToolbarFilter
            • API svyPopupFilter
          • API Documentation v1
            • API svyToolbarFilter v1
            • API svyPopupFilter v1
        • svyProperties
        • svySearch
        • svySecurity
          • Overview
          • Token-based Auth and SSO (NEW!)
          • API Documentation
          • Getting Started
          • Tenant replication
          • Security Management Console
            • Classic Security Management Console
          • svySecurityUX
          • svyProperties
          • API Doc svyProperties
        • svySecurityConsole
        • svySecurityUX
        • svyUtils
          • Log Manager
          • Log Manager Appenders
          • Smart Doc Editor Utils
          • Custom Dialogs
          • Excel Utils
          • Full API Reference
          • Crypto Utils
        • svyUtils$Excel
        • svyUtils$NGClient
        • svyUtils$customDialogs
        • svyUtils$logManagerAppenders
        • svyUtils$tableGrid
      • Layout
        • Boostrap 12grid layout
          • Collapsible Container
          • Simple Collapsible
          • Center Container
          • Inline Group Container
          • Flexbox Layout
      • Solutions
        • Sample Application
          • Tutorial Part 1
          • Tutorial Part 2
      • Packages
        • UI Component Packages
          • Advanced Renderers
          • Bootstrap Components
          • Bootstrap Extra Components
          • Canvas
          • Chart JS
          • Fullcalendar Component
          • googlemaps
          • kanban
          • Servoy Core
          • Servoy Extra Components
          • Servoy NG-Grids
          • Servoy PDF Viewer
          • smartDocumentEditor
        • Browser Plugin Packages
          • Block UI
          • Core NG only Services
          • Key Listener
          • NGDesktop File
          • NGDesktop UI
          • NGDesktop Utils
          • Web Notifications
          • Idle Web Service
    • Servoy Developer
      • Menu
        • File
        • Edit
        • Source
        • Refactor
        • Navigate
        • Search
        • Project
        • Actions
        • Run
        • Window
        • Help
      • Toolbar
      • Solution Explorer
        • Resources
          • Database Servers
            • Database Server
              • Procedures
              • Tables
              • Views
          • Security
          • i18n
        • All Solutions
          • Solution
          • Active Solution
            • Scopes
              • Scope
                • Variables
            • Forms
              • Working Set
              • Form
                • Controller
                • Variables
                • Elements
                • Relations
            • Form Components
              • Form Component
            • Relations
              • Relation
            • ValueLists
              • ValueList
            • Menus
              • Menu
                • MenuItem
            • Media
              • Folder
              • File
            • DataSources
              • In Memory DataSources
                • In Memory DataSource
              • View Foundsets DataSources
                • View Foundset DataSources
            • Servoy Packages
              • Package
            • Modules
              • Module
        • Solution Explorer Contextual List
      • Views
        • Command Console
        • Console
        • Problems
        • Tasks
        • Bookmarks
        • Search
        • Form Hierarchy
        • Help
        • JUnit
        • Outline
        • Profiler
        • Properties
        • Project Explorer
        • Call Hierarchy
      • Editors and Wizards
        • Property configurator for columns
        • Relation Editor
        • Text Format Editor
        • Date Format Editor
        • Number Format Editor
        • Database Synchronization Wizard
        • Security Editor
        • SQL Editor
        • i18n Editor
        • File Import Wizard
        • File Export Wizard
        • WAR Export Wizard
        • NGDesktop Export Wizard
        • Table Editor
        • Metadata Synchronization Wizard
        • Database Server Connection Editor
        • Text Property Editor
        • Valuelist Editor
        • Form Editor
          • Parts of the Form Editor
          • Designing a Form
          • Layout Tools
          • Using Containers
          • Creating and Using Forms
          • Using Servoy Beans
          • Using Shapes
          • Form Editor Subtabs
          • [Tips and Shortcuts][reference/servoy-developer/object-editors/form-editor-tips_and_shortcuts.md]
          • Editong a Responsive LayoutForm
          • CSS Positioning
        • Form Hierarchy
        • Component Properties Editor
        • Variable Editor
        • Method Selection Wizard
        • New Solution Wizard
        • Application Event Types Editor
        • New Form Wizard
        • Form Dataproviders Configurator
        • Servoy Resource Locator
        • Datasource Selection Wizard
        • Sorting Fields Wizard
        • Scripting Editor
          • Getting Started-Overview of Script Editor
          • Code Writing Features
          • Code Navigation
          • Code Rewriting Tools
          • Refactoring
          • Code Formatting
          • Script Editor Tips and Shortcuts
          • Unit Tests
        • Theme Editor
          • General Properties
          • Sidenav Properties
          • Navbar Properties
          • Tabs Properties
          • Windows Properties
          • Dialogs Properties
          • Tables Properties
          • Breadcrumb specific style Properties
          • Brand colors Properties
          • Validations Properties
          • Margins and Padding Properties
        • Editor Selection
        • Run Configurations
        • Debug Configurations
        • Externalize Strings Wizard
        • Font Chooser Wizard
        • Color Chooser Wizard
        • Project Properties Configurator
        • Move Wizard
        • External Tools Configurations
        • About Servoy Developer
        • Servoy Developer Installation Details
        • Eclipse Marketplace Wizard
        • Install Available Software Wizard
        • Cheat Sheet Selection Wizard
        • Servoy Developer Help Wizard
        • Switch to Editor Wizard
        • Find Actions Wizard
        • Customize Perspective Configurator
        • Quick Search Wizard
        • Search Wizard
        • Encoding Wizard
        • Task Wizard
        • Find - Replace Wizard
        • Properties Editor
        • New Project Wizard
        • New Method Wizard
        • New Menu Wizard
          • New MenuItem Wizard
        • Menu Editor
        • ServoyMenu Selection Wizard
        • JSMenu compatible component selector
        • Permissions Configuration Dialog
      • Project File Structure
        • Servoy Installation Directory
          • servoy.properties
        • Workspace Folder
          • Resources Directory
            • Database Information (.dbi) Files
          • Solution Folder
      • Package Manager
      • Preferences
      • Property Types for components / services
      • Debugger
        • Debug Explorer
        • Breakpoints
          • Breakpoint Properties
        • Variables
        • Expressions
        • Interactive Console
    • Application Server
    • Servoy Cloud
      • Cloud Control Center
        • Home
          • Setup Namespace
          • User profile
            • My Profile
            • Support
        • Download IDE
        • Application Overview
          • Applications
            • Pipelines
              • Jobs
                • Packages
                  • Commits
                  • Artifacts
                  • Configuration
                  • Quality reports
                  • Build markers
                • Job Configuration
                  • Build and Deploy or Build
                  • Mobile
                  • Desktop
            • Environments
              • Metrics
                • Users
                • Databases
                  • Metrics
                • System Health
                • Log Activity
                • App performance
                • Query performance
              • Cloud reporting
            • Security
              • Permissions
              • Tenants
            • Reports
            • Security Login Designer
              • Single Sign-On
                • Sign in with Google
                • Sign in with Microsoft
          • Code Repositories
        • Project Management
          • Tickets
          • Backlog
          • Active Sprints
        • User Management
          • Users
          • Roles
        • Administration
          • Security
            • ServoyCloud Roles
          • Credentials
          • Settings
        • Add-Ons
      • Database Backup
      • E2E Cypress Testing
        • Using Cypress
      • On-Premise Deployment
      • Privacy policy (ServoyAI)
      • FAQ
      • Migrate to Servoy Cloud
    • Extensions Developement
      • Component and Services
        • Component Development
        • Service Development
        • Tools and Dev Tips to use for Component/Service developement
        • Manifest (.mf file)
        • Specification (.spec file)
          • Property Types
            • Array property types
            • Custom object property types
            • Findmode property type
            • Foundset property type
            • Tags
        • Directives And Filters
          • Sablotabsequence
        • Console (serverside)
        • ServoyApi (serverside)
      • Serverside Plugins
        • Data Convertors and Validators
        • UI Convertors
  • Release notes
    • Release notes
      • 2025.03
      • 2024.03 (LTS)
      • 2023.03 (LTS)
      • 2025.03 (Servoy Cloud)
      • 2024.12
      • 2024.12 (Servoy Cloud)
      • 2024.09
      • 2024.09 (Servoy Cloud)
      • 2024.06
      • 2024.06 (Servoy Cloud)
      • 2024.03 (Servoy Cloud)
      • 2023.12
      • 2023.12 (Servoy Cloud)
      • 2023.09
      • 2023.09 (Servoy Cloud)
      • 2023.06
      • 2022.03 (LTS)
      • 2022.12 What's new
      • 2022.12
      • 2022.09 What's new
      • 2022.09
      • 2022.06 What's new
      • 2022.06
      • 2021.03.3 (LTS)
Powered by GitBook
On this page
  • API
  • appendToTXTFile(path,text,encoding)
  • clearTempFiles()
  • copyFile(src,dest,overwriteDest)
  • createFolder(path)
  • deleteFile(path,errorCallback)
  • deleteFileSync(path)
  • deleteFolder(path)
  • exists(path)
  • getFileStats(path)
  • getPath(path)
  • getReadOnly(path)
  • homeDir()
  • listDir(path)
  • openFile(path)
  • readFile(callback,path)
  • readFileSync(path)
  • readTXTFileSync(path,encoding)
  • renameFile(oldPath,newPath)
  • selectDirectory(callback)
  • selectDirectorySync(path)
  • selectFileSync(path)
  • setReadOnly(path,flag)
  • showOpenDialog(callback,options)
  • showOpenDialogSync(options)
  • showSaveDialog(callback,options)
  • showSaveDialogSync(options)
  • tmpDir()
  • unwatchDir(path)
  • unwatchFile(path)
  • watchDir(path,callback)
  • watchFile(path,callback)
  • writeFile(path,bytes,callback,passThru)
  • writeTXTFileSync(path,text_data,encoding)
  • writeTempFileSync(bytes)
  • Types
  • stats

Was this helpful?

  1. Reference
  2. Extensions
  3. Browser Plugins

NGDesktop File (ref)

PreviousNGDesktop FileNextNGDesktop UI (ref)

Last updated 1 month ago

Was this helpful?

(part of package '')

You can access it in code via: plugins.ngdesktopfile

API

appendToTXTFile(path,text,encoding)

Synchronously append data to a file, creating the file if it does not yet exist.

Parameters:

  • {} path - file's full path

  • {} text - text to be added

  • {} [encoding] - default utf8

Returns: True if the data was successfully appended to the file; otherwise, false.


clearTempFiles()

Clears the directory where temporary files are stored (e.g. when using writeTempFileSync(bytes)).

Returns: True if the temporary files directory was successfully cleared; otherwise, false.


copyFile(src,dest,overwriteDest)

Synchronously copies src to dest. By default, dest is overwritten if it already exists.

Parameters:


createFolder(path)

Synchronously creates a folder, including any necessary but nonexistent parent folders.

Parameters:


deleteFile(path,errorCallback)

Deletes the given file, optionally calling the error callback when unsuccessful

Parameters:


deleteFileSync(path)

Delete the given file, returning a boolean indicating success or failure

Parameters:


deleteFolder(path)

Synchronously deletes a folder, fails when folder is not empty

Parameters:


exists(path)

Test whether or not the given path exists by checking with the file system. It returns true if the path exists, false otherwise.

Parameters:


getFileStats(path)

Return a 'stats' object containing related file's information's. Please use forward slashes (/) instead of backward slashes in the path

Parameters:


getPath(path)

Retrieves the path to a special directory or file associated with the given name.

Parameters:


getReadOnly(path)

Verify readonly status on the specified path. Returns true for readonly otherwise false

Parameters:


homeDir()

Returns the home dir of the user like c:/users/[username] under windows. Will return always a both with forward slashes.


listDir(path)

returns an array of filenames that are in the given path. Please use forward slashes (/) instead of backward slashes.

Parameters:


openFile(path)

Opens a file specified at the given path on the client. It will open it in the desktop's default manner. This path must exist on the client's machine, you can't open a file with a path pointing to a file on the server; use writeFile() first to write it to the clients machine.

If it fails, it returns a string containing the error message corresponding to the failure. If the file has been successfully opened, it will return an empty string.

Parameters:


readFile(callback,path)

Reads the given bytes of a path, the callback is a function that will get as parameters the 'path' as a String and the 'file' as a JSUpload object If an error is happening in the browser then this error will be given as a 3rd argyument and the second file argument is then null. If the path is missing or contain only the file name then the native system dialog for opening files it is called. Please use forward slashes (/) instead of backward slashes in the path/filename

Parameters:


readFileSync(path)

Reads and returns the content of the given file This will throw an error if something goes wrong on the client, the error is then the message string. So this needs to be try/catched

Parameters:


readTXTFileSync(path,encoding)

Reads and returns the text of the given path/filename

Parameters:


renameFile(oldPath,newPath)

Synchronously rename file at oldPath to the pathname provided as newPath. In the case that newPath already exists, it will be overwritten.

Parameters:


selectDirectory(callback)

Select a folder and pass its path to the callback.

Parameters:


selectDirectorySync(path)

Return the selected folder.

Parameters:


selectFileSync(path)

Return the selected file.

Parameters:


setReadOnly(path,flag)

Set permisions to the specified file. If readOnly parameter is false, the file permisions flags will be set to read/write mode

Parameters:


showOpenDialog(callback,options)

Shows a file open dialog and calls the callback with the selected file path(s).

For the options object see https://www.electronjs.org/docs/api/dialog#dialogshowopendialogbrowserwindow-options

The core options are:

  • title: String the dialog title

  • defaultPath: String the default (starting) path

  • buttonLabel: String custom label for the confirmation button, when left empty the default label will be used.

  • filters: Array<{name: String, extensions: Array<String>}> an array of file filters (e.g. [{ name: 'Images', extensions: ['jpg', 'png', 'gif'] }])

  • properties: an Array of property keywords such as:

    • openFile - Allow files to be selected.

    • openDirectory - Allow directories to be selected.

    • multiSelections - Allow multiple paths to be selected.

Parameters:


showOpenDialogSync(options)

Shows a file open dialog and returns the selected file path(s).

To not block any process, showOpenDialog with a callback method is preferred over this method.

For the options object see https://www.electronjs.org/docs/api/dialog#dialogshowopendialogsyncbrowserwindow-options

Core options are:

  • title: String the dialog title

  • defaultPath: String the default (starting) path

  • buttonLabel: String custom label for the confirmation button, when left empty the default label will be used.

  • filters: Array<{name: String, extensions: Array<String>}> an array of file filters (e.g. [{ name: 'Images', extensions: ['jpg', 'png', 'gif'] }])

  • properties: an Array of property keywords such as:

    • openFile - Allow files to be selected.

    • openDirectory - Allow directories to be selected.

    • multiSelections - Allow multiple paths to be selected.

Parameters:


showSaveDialog(callback,options)

Shows a file save dialog and calls the callback method with the file path.

For the options object see https://www.electronjs.org/docs/api/dialog#dialogshowsavedialogbrowserwindow-options

Core options are:

  • title: String the dialog title

  • defaultPath: String - absolute directory path, absolute file path, or file name to use by default.

  • buttonLabel: String - custom label for the confirmation button, when left empty the default label will be used.

  • filters: Array<{name: String, extensions: Array<String>}> - an array of file filters (e.g. [{ name: 'Images', extensions: ['jpg', 'png', 'gif'] }])

Parameters:


showSaveDialogSync(options)

Shows a file save dialog.

To not block any process, showSaveDialog with a callback method is preferred over this method.

For the options object see https://www.electronjs.org/docs/api/dialog#dialogshowsavedialogsyncbrowserwindow-options

Core options are:

  • title: String the dialog title

  • defaultPath: String - absolute directory path, absolute file path, or file name to use by default.

  • buttonLabel: String - custom label for the confirmation button, when left empty the default label will be used.

  • filters: Array<{name: String, extensions: Array<String>}> - an array of file filters (e.g. [{ name: 'Images', extensions: ['jpg', 'png', 'gif'] }])

Parameters:


tmpDir()

Returns the tmp directory of the client machine. Will return always a both with forward slashes.


unwatchDir(path)

Stop watching a directory found at the given path.

Parameters:


unwatchFile(path)

Removes the watch to the file that was added by the watchFile() function. Please use forward slashes (/) instead of backward slashes in the path/filename

Parameters:


watchDir(path,callback)

Watches a directory for changes at the given path.

Parameters:


watchFile(path,callback)

Watches a give path, that should represent a file, for modifications. Please use forward slashes (/) instead of backward slashes in the path/filename

Parameters:


writeFile(path,bytes,callback,passThru)

Writes the given bytes to the path; if the path has sub-directories that are not there, then those are created. If the path is missing or contains only the file name, then the native system dialog for saving files is used.

When done, the optional callback is called with the written path (as a string), or 'error'. An optional passThru object is also passed back to the callback function. Please use forward slashes (/) instead of backward slashes in path/filename.

Parameters:


writeTXTFileSync(path,text_data,encoding)

Writes text to the given path/filename

Parameters:


writeTempFileSync(bytes)

A synchronous way to write bytes to a temporary file with a unique pseudo-random name, in a directory for temporary files. This directory will be cleared when the ngDesktop window is closed or when clearTempFiles() is called.

The function returns the path of the created file as a string.

Parameters:


Types

stats

Represents file system statistics for a file or directory. scripting type: CustomType<ngdesktopfile.stats>

  • atimeMs

    • The last access time in milliseconds.

  • birthtimeMs

    • The birth time (creation time) in milliseconds.

  • blksize

    • The block size for file system I/O.

  • blocks

    • The number of blocks allocated for the file.

  • ctimeMs

    • The last status change time in milliseconds.

  • dev

    • The device ID.

  • gid

    • The group ID of the file's owner.

  • ino

    • The inode number.

  • isBlockDevice

    • Indicates if the file is a block device.

    • Default Value: false

  • isCharacterDevice

    • Indicates if the file is a character device.

    • Default Value: false

  • isDirectory

    • Indicates if the path is a directory.

    • Default Value: false

  • isFIFO

    • Indicates if the file is a FIFO (named pipe).

    • Default Value: false

  • isFile

    • Indicates if the path is a regular file.

    • Default Value: false

  • isSocket

    • Indicates if the file is a socket.

    • Default Value: false

  • isSymbolicLink

    • Indicates if the file is a symbolic link.

    • Default Value: false

  • mode

    • The file mode (permissions).

  • mtimeMs

    • The last modification time in milliseconds.

  • nlink

    • The number of hard links.

  • rdev

    • The device ID (if the file is a special file).

  • uid

    • The user ID of the file's owner.


{} src - source filepath to copy

{} dest - destination filepath of the copy operation

{} [overwriteDest] - default true

Returns: True if the file was successfully copied; otherwise, false.

{} path - folders full path

Returns: True if the folder was successfully created; otherwise, false.

{} path The full path of the file to be deleted.

{} [errorCallback] An optional callback function that will be invoked if the deletion fails.

{} path The full path of the file to be deleted.

Returns: True if the file was successfully deleted; otherwise, false.

{} path - folders full path

Returns: True if the folder was successfully deleted; otherwise, false.

{} path - file's full path

Returns: True if the specified path exists in the file system; otherwise, false.

{} path The full path of the file whose statistics are to be retrieved.

Returns: An object containing file-related information.

{} path {('home' | 'desktop' | 'temp' | 'documents' | 'downloads')} name - The name of the directory or file.

Returns: The path to a special directory or file associated with the name, or an empty string if the name is not one of the allowed values.

{} path - directory's full path

Returns: True if the file or folder is read-only; otherwise, false.

Returns: The full path of the user's home directory, using forward slashes.

{} path The full path of the directory to list files from.

Returns: An array of filenames present in the specified directory path.

{} path - file's full path on the client.

Returns: An empty string if the file was successfully opened or a string containing the error message corresponding to the failure otherwise.

{} callback A function that receives the file path as a string and the file content as a JSUpload object or a 3rd argument with the error message.

{} [path] The full path of the file to read. If omitted or only a filename is provided, a file open dialog will be shown.

{} [path] The full path of the file to read.

Returns: The content of the file.

{} path The full path of the file to read.

{} [encoding] Optional, default 'utf8'

Returns: The content of the file as a string, or an empty string if the file could not be read.

{} oldPath - old file full path

{} newPath - new file full path

Returns: True if the file was successfully renamed; otherwise, false.

{} callback A function that receives the selected folder's path as an argument.

{} [path] The initial path to open the directory selection dialog at.

Returns: The full path of the selected folder, or an empty string if no folder was selected.

{} [path] The initial path to open the file selection dialog at.

Returns: The full path of the selected file, or an empty string if no file was selected.

{} path - File path

{} flag If true, sets the file to read-only mode; if false, allows read/write access.

Returns: True if the file permissions were successfully updated; otherwise, false.

{} callback A function that receives the selected file path(s) as an argument.

{} [options] {{title: String=, defaultPath: String=, buttonLabel: String=, filters: Array<{name: String, extensions: Array<String>}>=, properties: Array<String>}}

{} [options] {{title: String=, defaultPath: String=, buttonLabel: String=, filters: Array<{name: String, extensions: Array<String>}>=, properties: Array<String>}} [options]

Returns: An array of selected file or directory paths, or an empty array if no selection was made.

{} callback A function that receives the selected file path as an argument.

{} [options] {{title: String=, defaultPath: String=, buttonLabel: String=, filters: Array<{name: String, extensions: Array<String>}>=}} [options]

{} [options] {{title: String=, defaultPath: String=, buttonLabel: String=, filters: Array<{name: String, extensions: Array<String>}>=}}

Returns: The full path of the selected file if the user confirmed the dialog, or an empty string if the dialog was canceled.

Returns: The full path of the system's temporary directory, using forward slashes.

{} path The full path of the directory to stop watching for changes.

{} path The full path of the file to stop watching for modifications.

{} path - directory's full path

{} callback - the callback method to be executed

{} path The full path of the file to watch for modifications.

{} callback A function that will be triggered when the file is modified.

{} path The full path where the file will be written. If only a filename is provided, a save dialog will be shown.

{} bytes The binary data to write to the file.

{} [callback] An optional function that receives the written file path or an 'error' string if the operation fails.

{} [passThru] An optional object that will be passed back to the callback function.

{} path The full path of the file where the text will be written.

{} text_data The text content to write into the file.

{} [encoding] Encoding code (default 'utf8')

Returns: True if the text was successfully written to the file; otherwise, false.

{} bytes The binary data to be written to the temporary file.

Returns: The full path of the created temporary file.

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

Type:

NGDesktop File
String
String
String
Boolean
Boolean
String
String
Boolean
Boolean
String
Boolean
String
String
Boolean
String
Boolean
String
Boolean
String
String
String
String
Boolean
String
String
Array<String>
String
String
String
String
Object
String
String
String
String
String
Boolean
String
String
String
String
String
Boolean
Object
Object
Object
Array<String>
Object
Object
String
String
String
String
String
String
String
Array<Number>
Object
String
String
String
Boolean
Array<Number>
String
long
long
long
long
long
long
long
long
boolean
boolean
boolean
boolean
boolean
boolean
boolean
long
long
long
long
long
CustomType<ngdesktopfile.stats>
Function
Function
Function
Function
Function
Function
Function
Function