Class SyncConfig
The primary configuration settings that drive Cloud-ShareSync.
Inheritance
Implements
Namespace: Cloud_ShareSync.Core.Configuration.Types
Assembly: Cloud-ShareSync.Core.Configuration.dll
Syntax
public class SyncConfig : object, ICloudShareSyncConfig
Constructors
| Improve this Doc View SourceSyncConfig()
Declaration
public SyncConfig()
SyncConfig(String)
Declaration
public SyncConfig(string syncFolder)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | syncFolder |
Fields
| Improve this Doc View SourceDefaultSyncFolder
Declaration
const string DefaultSyncFolder = null
Field Value
| Type | Description |
|---|---|
| System.String |
Properties
| Improve this Doc View SourceCompressBeforeUpload
When enabled Cloud-ShareSync will use
To enable this feature you must also add Compression to the
EnabledFeatures.
When disabled files will not be compressed prior to upload. However if you attempt to download files that
were previously compressed before upload they will still be decompressed automatically as long as
Compression remains in the EnabledFeatures.
Declaration
public bool CompressBeforeUpload { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | false |
EnabledCloudProviders
The list of cloud providers to use in the Cloud-ShareSync process.
Declaration
public CloudProviders EnabledCloudProviders { get; set; }
Property Value
| Type | Description |
|---|---|
| CloudProviders |
EnabledFeatures
The list of features to enable and do configuration validation on.
Declaration
public Cloud_ShareSync_Features EnabledFeatures { get; set; }
Property Value
| Type | Description |
|---|---|
| Cloud_ShareSync_Features |
EncryptBeforeUpload
When enabled Cloud-ShareSync will use
To enable this feature you must also add Encryption to the
EnabledFeatures.
When disabled files will not be encrypted prior to upload. However if you attempt to download files that
were previously encrypted before upload they will still be decrypted automatically as long as
Encryption remains in the EnabledFeatures.
Declaration
public bool EncryptBeforeUpload { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | false |
ExcludePaths
Specify paths to exclude from the sync process.
You may use regex here.
Declaration
public string[] ExcludePaths { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String[] | An empty langword_csharp_string langword_csharp_array. |
ObfuscateUploadedFileNames
When enabled files will be uploaded to configured cloud providers with their filename set to the sha512 hashed value of the pre-upload file hash.
Example:
A file named "ABC.txt" has a filehash with a hex encoded string of "0123456789".
When this feature is enabled Cloud-ShareSync will call
"ABC.txt" would then be uploaded with a filename of
"bb96c2fc40d2d54617d6f276febe571f623a8dadf0b734855299b0e107fda32cf6b69f2da32b36445d73690b93cbd0f7bfc20e0f7f28553d2a4428f23b716e90".
When Cloud-ShareSync re-downloaded the file it would be correctly named "ABC.txt".
Declaration
public bool ObfuscateUploadedFileNames { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | false |
Recurse
When enabled Cloud-ShareSync will sync files in directories below the SyncFolder.
When disabled Cloud-ShareSync will only sync files directly in the root of the SyncFolder.
Declaration
public bool Recurse { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | true |
SyncFolder
The root directory to sync with configured cloud providers.
Declaration
public string SyncFolder { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
UniqueCompressionPasswords
When CompressBeforeUpload is enabled this field enables optional password protections of
the compressed files.
When UniqueCompressionPasswords is enabled
When disabled compressed files will not be password protected.
Declaration
public bool UniqueCompressionPasswords { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean | false |
WorkingDirectory
Set to the path of the directory to use as a working directory when compressing or encrypting files,
as well as for file decompression and decryption.
This does not need to be set unless EncryptBeforeUpload or CompressBeforeUpload
have been enabled.
Declaration
public string WorkingDirectory { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String | An empty langword_csharp_string |
Methods
| Improve this Doc View SourceToString()
Returns the SyncConfig as a json formatted string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String |