Copying a file in an extension

Pretty new to jupyterlab/typescript and I’m trying to get a button to implement a copy command for a file. I basically want to use this function, specify fromFile and toDir parameters and have to copy take place.

I am having a hard time importing it into a function and using it. I also don’t quite understand how to use the core tokens. Any help would be appreciated!

Here is my error message:

router.js:132 Routing /lab/tree/package.json?copy to berk:copy-notebook failed TypeError: docmanager.copy is not a function
    at Object.<anonymous> (index.js:77)
    at Generator.next (<anonymous>)
    at index.js:7
    at new Promise (<anonymous>)
    at push.LfHT.__awaiter (index.js:3)
    at execute (index.js:45)
    at CommandRegistry.push.5TpB.CommandRegistry.execute (index.js:351)
    at next (router.js:125)
    at Router.route (router.js:136)
    at index.js:150
next @ router.js:132
async function (async)
next @ router.js:125
route @ router.js:136
(anonymous) @ index.js:150
Promise.then (async)
activate @ index.js:148
(anonymous) @ index.js:147
Promise.then (async)
push.2R+v.Application.activatePlugin @ index.js:146
push.2R+v.Application.resolveRequiredService @ index.js:190
(anonymous) @ index.js:140
push.2R+v.Application.activatePlugin @ index.js:140
push.2R+v.Application.resolveOptionalService @ index.js:223
(anonymous) @ index.js:142
push.2R+v.Application.activatePlugin @ index.js:142
push.2R+v.Application.resolveOptionalService @ index.js:223
(anonymous) @ index.js:142
push.2R+v.Application.activatePlugin @ index.js:142
push.2R+v.Application.resolveRequiredService @ index.js:190
(anonymous) @ index.js:140
push.2R+v.Application.activatePlugin @ index.js:140
(anonymous) @ index.js:266
push.2R+v.Application.start @ index.js:265
main @ index.out.js:1483
load (async)
ANye @ index.out.js:1529
__webpack_require__ @ bootstrap:84
0 @ bootstrap:221
__webpack_require__ @ bootstrap:84
checkDeferredModules @ bootstrap:45
webpackJsonpCallback @ bootstrap:32
(anonymous) @ vendors~main.03c5b4b210fbcf158911.js:1