removeFile(fileURL, doAutoAuth = true)

The pods:removeFile() action removes the file at the specified URL, fileURL, from the connected pod. pods:connectStorage() should be called at some point prior to using this action (pods:connectStorage() does not need to be called again if the pico engine is restarted).

The pods:removeFile() action has the following parameters:

  • fileURL — A required string parameter that informs the library where the file to be removed exists inside the pod. This should be a full, absolute URL with an http scheme (e.g. http://examplepodserver.org/podName/container/file.txt).

  • doAutoAuth — An optional boolean parameter that controls automatic authentication attempts. It defaults to true if nothing is passed in for it. When true, the library will check that the stored authentication token is valid if it exists, and if the token is not valid or the token does not exist, the library will attempt to automatically authenticate once.

Copyright Picolabs | Licensed under Creative Commons.