import Client , { File , Folder , Share , Tag , FileSystemElement } 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" ) ) ; const tag1 = await client . createTag ( "tag 1" ) ; const tag2 = await client . createTag ( "tag 2" ) ; folder . addTag ( tag1 . name ) ; file . addTag ( tag1 . name ) ; file . addTag ( tag2 . name ) ; let fse = await client . getFileSystemElementByTags ( [ tag1 ] ) ; console . log ( fse [ 0 ] . name ) ; console . log ( fse [ 1 ] . name ) ; fse = await client . getFileSystemElementByTags ( [ tag1 , tag2 ] ) ; console . log ( fse [ 0 ] . name ) ; await tag1 . delete ( ) ; await tag2 . delete ( ) ; await folder . delete ( ) ; } catch ( e ) { console . log ( e ) ; } } ) ( ) ;