wso2 / streaming-integrator

A stream processing runtime that allows connecting any streaming data source to any destination and act on it
Apache License 2.0
113 stars 50 forks source link

File:move() operation with exclude.dir=true does not work as expected in Windows #183

Closed dilini-muthumala closed 3 years ago

dilini-muthumala commented 3 years ago

Description: File:move() operation with exclude.dir=true does not work as expected in Windows

Affected Product Version: SI 1.1.0

OS, DB, other environment details and versions:
Windows 10 Pro

Steps to reproduce:

  1. Create a file foo.txt in C:\Users\wso2\Desktop\input
  2. Deploy below Siddhi app (FileMove) and wait until the app is deployed.
  3. List the contents in C:\Users\wso2\Desktop\output folder

Expected output: foo.txt file only (as it is. It should not be contained in another folder)

Actual output: Following folder structure can be seen \Users\wso2\Desktop\input\foo.txt

@App:name('FileMove')

@App:description('Moving file from source to target')

define trigger  hardcopyStream at 'start';

@info(name = 'fileMoveQuery')
from hardcopyStream#file:move("C:\Users\wso2\Desktop\input", "C:\Users\wso2\Desktop\output", '', true)
select * 
insert into resultStream;