Documentationcurrent version
Help us improve the docs by fixing typos and proposing enhancements.

Nikita

Action "fs.base.readlink"

Read a link to retrieve its destination path.

Schema definitions

definitions =
  config:
    type: 'object'
    properties:
      'target':
        oneOf: [{type: 'string'}, {instanceof: 'Buffer'}]
        description: '''
        Location of the link to read.
        '''
    required: ['target']

Handler

handler = ({config}) ->
  {stdout} = await @execute
    command: "readlink #{config.target}"
  target: stdout.trim()

Exports

module.exports =
  handler: handler
  metadata:
    argument_to_config: 'target'
    log: false
    raw_output: true
    definitions: definitions
Edit on GitHub
Navigate
About

Nikita is an open source project hosted on GitHub and developed by Adaltas.