* xl/ListFiles: return as many objects as requested and take care of eof (#1361)
* xl/ListFiles: fix review comments.
* xl/ListFiles: Add windows filepath translation.
* xl/ListFiles: Use slashSeparator instead of "/". Remove filepath.FromSlash() as golang-windows takes care of it automatically.
master
Krishna Srinivas9 years agocommitted byHarshavardhana
_,err=obj.PutObject("bucket",key,int64(len("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.")),bytes.NewBufferString("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed."),nil)
c.Assert(err,check.IsNil)
/*
result,err=obj.ListObjects("bucket","","","",5)
c.Assert(err,check.IsNil)
c.Assert(len(result.Objects),check.Equals,i+1)
c.Assert(result.IsTruncated,check.Equals,false)
*/
result,err=obj.ListObjects("bucket","","","",5)
c.Assert(err,check.IsNil)
c.Assert(len(result.Objects),check.Equals,i+1)
c.Assert(result.IsTruncated,check.Equals,false)
}
// check after paging occurs pages work
fori:=6;i<=10;i++{
key:="obj"+strconv.Itoa(i)
_,err=obj.PutObject("bucket",key,int64(len("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.")),bytes.NewBufferString("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed."),nil)
_,err=obj.PutObject("bucket","newPrefix2",int64(len("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed.")),bytes.NewBufferString("The specified multipart upload does not exist. The upload ID might be invalid, or the multipart upload might have been aborted or completed."),nil)