Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support added to remove files; force flag feature added for file share #2

Closed
wants to merge 23 commits into from

Conversation

prjain-msft
Copy link
Contributor

Support added to remove and force flag for file share.

@prjain-msft prjain-msft requested a review from jiacfan May 14, 2018 18:37
e := removeBlobEnumerator(jobPartOrder)
err = e.enumerate(cca.src, cca.recursive, cca.dst, &wg, cca.waitUntilJobCompletion)
lastPartNumber = e.PartNum
case common.EFromTo.FileTrash():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this word is suitable, would better be more friendly.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with Trash. Do you want to suggest a different word?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember Microsoft has TSA which could help to scan special words not suitable to use. And I'm not sure if Trash can pass scan. I know Windows use Recycle bin for deleted files. What about using Recycle?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't care too much about this but I'd be OK with BlobRemove/FileRemove. This solidifies the link between Remove and removeEnumerator.

waitUntilJobCompletion func(jobID common.JobID, wg *sync.WaitGroup)) error {
return addTransfer((*common.CopyJobPartOrderRequest)(e), transfer, wg, waitUntilJobCompletion)
}

// send the current list of transfer to the STE
func (e *removeEnumerator) dispatchFinalPart() error {
func (e *removeBlobEnumerator) dispatchFinalPart() error {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check the dispatchFinalPart method like File, dispatchFinalPart((*common.CopyJobPartOrderRequest)(e)), this could save codes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the Jeffery's comments, and in favor of the idea.




// Check if source URL is in directory/* expression, and transfer it to remove from directory if the express is directory/*.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[minor]Please be aware of empty lines above...


e.addTransfer(common.CopyTransfer{
Source: f.String(),
SourceSize: fileInfo.Properties.ContentLength},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the difference here is removing function doesn't need destination path and LMT. And see your concern about dup-code in your email. This should be similar for both blob and file, and I'm ok with it if you guys feeling cool~

Copy link
Member

@jiacfan jiacfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@JeffreyRichter
Copy link
Member

JeffreyRichter commented May 15, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants