makedirectory

package
Version: v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 8, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

README

Make Directory

This activity allows you to make a directory. With the options, it is possible to create all parents directories if necessary and set the permissions.

Installation

Flogo Web
Start

Start a container of Flogo Web UI :

docker run --name flogo -it -d -p 3303:3303 -e FLOGO_NO_ENGINE_RECREATION=false flogo/flogo-docker eula-accept

The environment variable FLOGO_NO_ENGINE_RECREATION=false allows to force import of installed contributions.

Installation of the activity

To install the activity into the started container :

docker exec -it flogo sh -c 'cd /tmp/flogo-web/build/server/local/engines/flogo-web && flogo install github.com/square-it/flogo-contrib-activities/makedirectory'

Restart the container

docker restart flogo
Flogo CLI
flogo install github.com/square-it/flogo-contrib-activities/makedirectory

Schema

Inputs and Outputs:

{
  "inputs":[
    {
      "name": "path",
      "type": "string",
      "required": "true"
    },
    {
      "name":"all",
      "type":"boolean",
      "value": false
    },
    {
      "name":"permissions",
      "type":"string",
      "value": "0777"
    }
  ],
  "outputs": [
  ]
 }

Settings

Setting Required Description
path True The path to be created
all False If this field is set to true, create all parents directories if necessary. This field defaults to false.
permissions False Set the permissions of the directory or directorys if all option is set to true. This field defaults to 0777. The format of the permissions is Unix permission bits.

Examples

Make a directory

This example make the directory /tmp/dir.

{
  "id": "makedirectory_1",
  "name": "Make Directory",
  "description": "Make a directory",
  "activity": {
    "ref": "github.com/square-it/flogo-contrib-activities/makedirectory",
    "input": {
      "path": "/tmp/dir",
    }
  }
}
Make a directory and all these parents

This example make the directories /tmp/dir1, /tmp/dir1/dir2, /tmp/dir1/dir2/dir3.

{
  "id": "makedirectory_1",
  "name": "Make Directory",
  "description": "Make a directory",
  "activity": {
    "ref": "github.com/square-it/flogo-contrib-activities/makedirectory",
    "input": {
      "path": "/tmp/dir1/dir2/dir3",
      "all": true
    }
  }
}

Make a directory with permissions

This example make the directory /tmp/dir with permissions 0700 or drwx------.

{
  "id": "makedirectory_1",
  "name": "Make Directory",
  "description": "Make a directory",
  "activity": {
    "ref": "github.com/square-it/flogo-contrib-activities/makedirectory",
    "input": {
      "path": "/tmp/dir",
      "permissions": "0700"
    }
  }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewActivity

func NewActivity(metadata *activity.Metadata) activity.Activity

NewActivity creates a new activity

Types

type MakeDirectoryActivity

type MakeDirectoryActivity struct {
	// contains filtered or unexported fields
}

MakeDirectoryActivity is a stub for your Activity implementation

func (*MakeDirectoryActivity) Eval

func (a *MakeDirectoryActivity) Eval(context activity.Context) (done bool, err error)

Eval implements activity.Activity.Eval

func (*MakeDirectoryActivity) Metadata

func (a *MakeDirectoryActivity) Metadata() *activity.Metadata

Metadata implements activity.Activity.Metadata

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL