Reputation: 3
I have a scenario which we use a Azure File Share storage to store large files and need to copy those files to another location such as OneDrive or Share Point. Copying files will be selected based on some criteria and I need to start this in a Spring Boot application with a scheduled task.
Is this task feasible with Java and other above mentioned Microsoft Products?
Upvotes: -1
Views: 432
Reputation: 2440
public static Boolean createFileShare(String connectStr, String shareName)
{
try
{
ShareClient shareClient = new ShareClientBuilder()
.connectionString(connectStr).shareName(shareName)
.buildClient();
shareClient.create();
return true;
}
catch (Exception e)
{
System.out.println("createFileShare exception: " + e.getMessage());
return false;
}
}
Upvotes: 0