Abraham P
Abraham P

Reputation: 15471

nuxeo check if directory exists through API

Let's say I have a directory at

/foo/bar/bazz

Let's say I would like to verify its existence programmatically:

client = new nuxeo.Client(nuxeoParams)
client.connect()
fetchOp = client.operation "Diretory.Entries"
path = "doc:/foo/bar/bazz"
fetchParams = directoryName: path
fetchOp.params(fetchParams)
fetchOp.execute(function(error, data){
    if(error){
      console.debug('error')
    } else {
      console.debug('data')
    }
})

This show a 404 error. Why? What am I missing? How do I fix this? Thank you.

Upvotes: 0

Views: 424

Answers (1)

Steven Huwig
Steven Huwig

Reputation: 20794

fetchOp = client.operation "Diretory.Entries"

Did you misspell fetchOp = client.operation "Directory.Entries"?

Upvotes: 1

Related Questions