In Google Drive SDK how do you copy a folder?

后端 未结 1 1308
余生分开走
余生分开走 2021-01-12 04:59

Very simple question. How can I copy a folder with the Google Drive API?

It looks like the file/copy API endpoint doesn\'t work with folders (though this limitation

相关标签:
1条回答
  • 2021-01-12 05:30

    'copy' wouldn't make much sense on a folder. The purpose of copy is to create a second file with the same media content as the first. Since a folder has no media content, 'copy' doesn't really apply.

    To answer the question, we need to understand your use case a little. Take a *nix paradigm, "cp -R folder1 folder2" is recursively duplicating all of the files. If that is your use case, you'll need to manually recurse down the tree. If you want the same files to appear in two places, (ie. "ln -s folder1 folder2") then that is done by adding a second parent.

    0 讨论(0)
提交回复
热议问题