Skip to content

Home

Development

IDEs

API Explorer

VfsMethods

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

Sample Gloop service showing how to use the `VfsMethods` one-liners

 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 )