Properly identifying symlinks

I am experimenting with indexing contents of a directory into PouchDB for easier browsing of large deep trees.

I want to be able to handle symlinks. I’m able to get the raw data using ipfs.block.get. The type returned from is unknown. Are there things other than symlinks with a type of unknown? If so, do other unknowns than symlinks have a first byte of 10?

Here is the start I have on reading the directory structure:

const listDir = async (key, path = []) => {
  const list = await
  list.forEach(async (entry) => {
    const name = `${path.join('/')}/${}`
    switch(entry.type) {
      case 'dir':
        console.log(`Dir: "${name}": Recursing`)
        listDir(`${key}/${}`, [...path,])
      case 'file':
        console.log(`File: "${name}": ${entry.hash}`)
        const block = await ipfs.block.get(entry.hash)
        if([0] === 10) {
          console.log(`Link: "${name}": ${}`)
        } else {
          console.log(`Unknown: "${name}": ${}`)

Might be a bug - are you using js-ipfs or js-ipfs-http-client?

I’m using the IPFS Companion with the IPFS Desktop, so I assume the window.ipfs it provides is using the js-ipfs-http-client.

What are you suggesting is a bug? The fact that returns a type of unknown for symlinks?