Skip to content

Home

Development

IDEs

JAR services

API Explorer

VfsFunctions

Vfs class contains functions for publishing and obtaining files to and from virtual file systems. The functions in this class rely on the Apache Commons VFS library in order to perform operations. Below are some example usages:

Sample service showing how to use the `Vfs` functions

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
  // Create the properties map
  def fileSystemProperties = [
    'applicationName': applicationName,
    'clientId': clientId,
    'clientSecret': clientSecret,
    'refreshToken': refreshToken,
    'accessToken': accessToken,
    'autoRetry': autoRetry
  ]

  def fileContent = 'gdv://destination/file.txt'.file( fileSystemProperties )

  def data = 'hello world'
  fileContent.writeFile( data, false, 1024 )