Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

VfsMethods

VfsMethods contains one-liners for obtaining and publishing files to 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
15
// Create the properties map
def fileSystemProperties = [
    'applicationName': applicationName,
    'clientId': clientId,
    'clientSecret': clientSecret,
    'refreshToken': refreshToken,
    'accessToken': accessToken,
    'autoRetry': autoRetry
]

// Create a file in Google Drive
'All dogs are good bois.'.sentTo('gdv://destination/file.txt', fileSystemProperties)

// Fetch the content of a remote file
'gdv://destination/file.txt'.vfsGet(fileSystemProperties)