Skip to content

Commit

Permalink
SDK-3766 Add isNodeSyncableWithError method
Browse files Browse the repository at this point in the history
  • Loading branch information
konnovdev committed Mar 19, 2024
1 parent 7e7946e commit 5ee49cb
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions bindings/java/nz/mega/sdk/MegaApiJava.java
Original file line number Diff line number Diff line change
Expand Up @@ -12746,4 +12746,28 @@ public void resumeSync(long backupId) {
public void pauseSync(long backupId) {
megaApi.setSyncRunState(backupId, RUNSTATE_SUSPENDED);
}

/**
* @brief Check if it's possible to start synchronizing a folder node. Return SyncError errors.
*
* Possible return values for this function are:
* - MegaError::API_OK if the folder is syncable
* - MegaError::API_ENOENT if the node doesn't exist in the account
* - MegaError::API_EARGS if the node is NULL or is not a folder
*
* - MegaError::API_EACCESS:
* SyncError: SHARE_NON_FULL_ACCESS An ancestor node does not have full access
* SyncError: REMOTE_NODE_INSIDE_RUBBISH
* - MegaError::API_EEXIST if there is a conflicting synchronization (nodes can't be synced twice)
* SyncError: ACTIVE_SYNC_BELOW_PATH - There's a synced node below the path to be synced
* SyncError: ACTIVE_SYNC_ABOVE_PATH - There's a synced node above the path to be synced
* SyncError: ACTIVE_SYNC_SAME_PATH - There's a synced node at the path to be synced
* - MegaError::API_EINCOMPLETE if the SDK hasn't been built with support for synchronization
*
* @return API_OK if syncable. Error otherwise sets syncError in the returned MegaError
* caller must free
*/
public MegaError isNodeSyncableWithError(MegaNode megaNode) {
return megaApi.isNodeSyncableWithError(megaNode);
}
}

0 comments on commit 5ee49cb

Please sign in to comment.