Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to rename directories #22

Open
sespinoza-dev opened this issue Jul 1, 2022 · 0 comments
Open

Unable to rename directories #22

sespinoza-dev opened this issue Jul 1, 2022 · 0 comments

Comments

@sespinoza-dev
Copy link

I'm unable to rename directories.

The current documentation says it's possible to rename both directories and files.

const NETSTORAGE_TARGET = '/<cpcode>/temp_test/v0'
const NETSTORAGE_DESTINATION = '/<cpcode>/temp_test/v1'
console.log('source', NETSTORAGE_TARGET)
console.log('target', NETSTORAGE_DESTINATION)

ns.rename(NETSTORAGE_TARGET, NETSTORAGE_DESTINATION, (err, response, body) => {
  if (err) {
    console.error('err', err)
    throw err
  }
  console.log('err', err)

  console.log('statusCode: ', response.statusCode)
  console.log('statusMessage: ', response.statusMessage)
  console.log('body ', body)
})

logs

source /<cpcode>/temp_test/v0
target /<cpcode>/temp_test/v1
err null
statusCode:  404
statusMessage:  Not Found
body  { message: 'Source not found' }
  • the cpcode is part of the base path.
  • I've checked that the path is correct, as I've renamed a file that is in the same level of the directory I'm trying to rename.

I'll appreciate any help,
Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant