Class SyncanyRemoteFile
- java.lang.Object
-
- org.syncany.plugins.transfer.files.RemoteFile
-
- org.syncany.plugins.transfer.files.SyncanyRemoteFile
-
public class SyncanyRemoteFile extends RemoteFile
The repo file represents the repository-defining file. It is used to describe the chunking and encryption parameters of an an initialized repository.Name pattern: The file must always be called syncany Initializing an instance with a different name will throw an exception.
-
-
Constructor Summary
Constructors Constructor Description SyncanyRemoteFile()Initializes a new repo file with the name syncany.SyncanyRemoteFile(java.lang.String name)Initializes a new repo file, given a name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringvalidateName(java.lang.String name)Parses the name of the file and validates it against the classes name pattern.-
Methods inherited from class org.syncany.plugins.transfer.files.RemoteFile
createRemoteFile, createRemoteFile, equals, getAttributes, getName, hashCode, setAttributes, toString
-
-
-
-
Constructor Detail
-
SyncanyRemoteFile
public SyncanyRemoteFile() throws StorageException
Initializes a new repo file with the name syncany.- Throws:
StorageException- Never throws an exception.
-
SyncanyRemoteFile
public SyncanyRemoteFile(java.lang.String name) throws StorageException
Initializes a new repo file, given a name. This constructor might be called by thecreateRemoteFile()method of theRemoteFile.- Parameters:
name- Repo file name; must always be syncany- Throws:
StorageException- If the name is not syncany
-
-
Method Detail
-
validateName
protected java.lang.String validateName(java.lang.String name) throws StorageException
Description copied from class:RemoteFileParses the name of the file and validates it against the classes name pattern. WhileRemoteFilehas no name pattern (and never throws an exception), sub-classes might by overriding this method.- Overrides:
validateNamein classRemoteFile- Parameters:
name- The name of the file (as it is identified by Syncany)- Returns:
- Returns a (potentially changed) name, after validating the name
- Throws:
StorageException- If the name does not match the name pattern defined by the class.
Note:RemoteFiledoes never throw this exceptions, however, subclasses might.
-
-