Class InitOperation


  • public class InitOperation
    extends AbstractInitOperation
    The init operation initializes a new repository at a given remote storage location. Its responsibilities include:
    • Generating a master key from the user password (if encryption is enabled) using the createMasterKey() method
    • Creating the local Syncany folder structure in the local directory (.syncany folder and the sub-structure).
    • Initializing the remote storage (creating folder-structure, if necessary) using a transfer manager.
    • Creating a new repo and master file using RepoTO and MasterTO, saving them locally and uploading them to the remote repository.
    • Method Detail

      • execute

        public InitOperationResult execute()
                                    throws java.lang.Exception
        Description copied from class: Operation
        Executes the operation synchronously and returns a result when the operation exits. Using covariance is recommend, that is OperationFoo should override execute so as to return a OperationFooResult rather than OperationResult.
        Specified by:
        execute in class Operation
        Returns:
        Returns an operation-specific operation result
        Throws:
        java.lang.Exception - If the operation fails