Directory hierarchy not replicated in another node with files.write

I’m relatively new to this and trying out something.

There are 2 IPFS nodes.
Node1
Node2

Tried creating directory hierarchy in Node1 instance using ‘ipfs-http-client’ package.

ipfs.files.write(‘path/to/something’, content, { parent : true, create : true });

Node1 show hierarchy but not same hierarchy replicated on Node2.