filenameThe file to copy from.string (required)
accessorThe accessor to usestring
destThe destination file to write.string (required)
permissionsRequired permissions (e.g. ‘x’).string
appendIf true we append to the target file otherwise truncate itbool


Copy a file.

The source file can use any accessor - for example one can copy the $MFT using the ntfs accessor to a regular file. Another example is to extract a file from a zip file using the zip accessor into a file on disk.

This function can also be used to create new files with prescribed content - for example:

SELECT copy(filename="Hello world", accessor="data", dest="C:/hi.txt")
FROM scope()

NOTE: Sparse files are padded out

comments powered by Disqus