> We currently have no mv in the ChangeSet and I would propose that we
> start with delete and add operations (testcases below) for version
> 0.1.

Well, that's where it gets interesting ;)

> "Also how do we deal with directories?
> delete dir1
> add dir1/test.txt
>
> mv dir1/test.text dir2/test.txt
> delete dir1"
>
> In a TAR file, you have to delete all files with dir1 in name, if you
> do a delete dir1. Means, you do a "dir1/*".  If I remember right, I
> don't know a single archiver who can handle empty folders. ZIP can't
> and TAR can't too. I am unsure about AR and CPIO, but I guess it's the
> same here cause it's similar to tar.

True

> OK. Some testcases:
>
> 1) delete dir1
> Should result in delete dir1/*
>
> 2) delete dir1 + add dir1/test.txt
> Should delete dir1/* and add dir1/test.txt at the end
>
> 3) add dir1/test.txt + delete dir1
> Should add dir1/test.txt and delete it afterwards. However, here we
> need some merger stuff. I think we can surpress the add operation if
> there is a delete operation for this dir.
>
> 4) mv dir1/test.text dir2/test.txt + delete dir1"
> Moves the file to dir2 and deletes everything in dir1
>
> 5) add dir1/bla.txt + mv dir1/test.text dir2/test.txt + delete dir1"
> Add dir1/bla.txt should be surpressed. All other dir1 files will be
> deleted, except dir1/test.text will be moved
>
> 6) delete dir1 + add dir1/bla.txt
> Like in every shell, I would think that this would delete all dir1/*
> files first, and then adds a new file bla.txt in dir1.

Tthe question is whether it is missing an

 add dir1/

Do we create directories implicit?

> 7) delete dir1 + add dir1/bla.txt + delete dir1
> Deletes dir1/* first, then surpresses the add of bla.txt cause there
> is a delete operation later.

So let's get that into a testcase.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to