How can attach cid to new node

cidA fie
cidB dir with sub cids

how can i make a new is

(new root cid)
- name1 = cidA
- dir2 = cidB

ipfs.files.write looks like not allow content is cid