How can i make copy folder from local disk (for example: ubunto OS) with sub-folder that include several files into google cloud storage using GOOGLE API with JAVA ,
with the BEST PERFORMANCE.
(Something like copy & paste the local directory into google cloud using api)
File hierarchy :
root folder -->
sub folder 1 : { file1 , file2 , ...}
sub folder 2 : { file3 , file4 , ...}
attached code snippet:
InputStreamContent content = new InputStreamContent(contentType, fileData);
Storage client = new Storage.Builder(httpTransport, JSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build();
try {
Storage.Objects.Insert insert = client.objects().insert(bucketName, null, content);
insert.setName(fileName);
insert.setPredefinedAcl("publicRead");
but this code only insert file ( object) into pre-configured folder.
Any ideas please?
BR
Vitaly