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

Nikita

Action "fs.base.symlink"

Delete a name and possibly the file it refers to.

Schema definitions

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

Handler

handler = ({config}) ->
  await @execute
    command: """
    ln -sf #{escapeshellarg config.source} #{escapeshellarg config.target}
    """

Exports

module.exports =
  handler: handler
  metadata:
    argument_to_config: 'target'
    log: false
    raw_output: true
    definitions: definitions

Dependencies

utils = require '../../../utils'
{escapeshellarg} = utils.string
Edit on GitHub
Navigate
About

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