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

symlink #51

Merged
merged 5 commits into from
Nov 1, 2016
Merged

symlink #51

merged 5 commits into from
Nov 1, 2016

Conversation

baiyubin
Copy link
Contributor

支持sym link功能。添加两个接口:

  • createSymbolicLink,对应于API Put Link;
  • getSymbolicLink对应于API Get Link。

* @throws OSSException OSS Server异常信息。
* @throws ClientException OSS Client异常信息。
*/
public void createSymbolicLink(String bucketName, String symLink, String targetObject)

Choose a reason for hiding this comment

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

建议使用symlink, 而不是symbolic link,

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的。

String key = genericRequest.getKey();

assertParameterNotNull(bucketName, "bucketName");
assertParameterNotNull(key, "symLink");

Choose a reason for hiding this comment

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

建议写成 symlink, 网上有这个词, 无须symLink

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的。

* Test Symbolic Link
*/
public class SymbolicLinkTest extends TestBase {

Choose a reason for hiding this comment

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

case有点少;建议加入case: 目标为中文文件名; Get Object时,目标鉴权失败时的行为;目标不存在时的行为;目标为symlink的行为;

Copy link
Contributor Author

@baiyubin baiyubin Oct 31, 2016

Choose a reason for hiding this comment

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

创建symbolic时,

  1. 不检查link target是否存在
  2. 不检查link target类型是否合法
  3. 不检查link target是否有权限访问
    以上检查,都推迟到GetObject等需要访问link target的API。
    另外,SDK不会测试feature的所有特性,feature的功能有它的case保证。SDK只需要保证SDK的正确性即可。API文档中会对这些行为给出说明。

@baiyubin baiyubin merged commit bf5ba31 into master Nov 1, 2016
@baiyubin baiyubin deleted the symlink branch October 27, 2017 01:28
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.

None yet

3 participants