import Client , { File , Folder , Share } from "./../client" ; ( async ( ) => { try { const client = new Client ( ) ; const folder = await client . createFolder ( "folder/subfolder" ) ; const file = await folder . createFile ( "myFile.txt" , Buffer . from ( "My file content" ) ) ; await file . addTag ( "MyTag" ) ; await file . addComment ( "myComment" ) ; const content = await file . getContent ( ) ; const share = await client . createShare ( { fileSystemElement : file } ) ; await share . setPassword ( "some password" ) ; await share . setNote ( "some note\nnew line" ) ; const shareLink = share . url ; await folder . delete ( ) ; } catch ( e ) { console . log ( e ) ; } } ) ( ) ;