V7 Scripting: Ephemeral VFSs
How V7 simplifies a most coveted task: moving files across Virtual File Systems
Over the past couple of years, since we released V6, and even before then when our users were running older V4/V5 versions of our software, a common question has been: “how do I copy/move a file some place else as soon as it’s uploaded?”
Up until and including V6 this is only possible if the current VFS associated to the user in the ongoing client session points to a local file-system (local disk) path.
Syncplify Server! V7 radically changes all of that by introducing ephemeral (temporary) VFSs that can be instantiated by scripts at run-time, during a client session, to access not only the current VFS (via GetCurrentVFS()
) but also any other supported VFS type (via new VirtualFS(VFSConfig)
).
This approach simplifies copying/moving files across VFSs:
Get the current VFS or create an ephemeral one as the source.
Create a second ephemeral VFS as the destination.
Use the
CopyToVFS
orMoveToVFS
method to transfer the object from source to destination.
The process is straightforward and efficient:
This is no longer limited to the local file-system, both the current VFS and any ephemeral ones you create in your scripts can be of any of the supported types: disk, a shared UNC path, an S3 bucket, an Azure Blob Storage, or a Google Cloud Storage bucket.
Only R2FS is restricted because of its very unique and very special functional model which we will describe in a future post (and you won’t need to copy/move files from/to it anyways.
Yet another step forward for the SyncJS language, and a great utility for all Syncplify users and customers!