diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..47ae637
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+# For more information about the properties used in this file,
+# please see the EditorConfig documentation:
+# http://editorconfig.org
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 4
+indent_style = space
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[{*.yml,package.json}]
+indent_size = 2
+
+# The indent size used in the package.json file cannot be changed:
+# https://github.com/npm/npm/pull/3180#issuecomment-16336516
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..9bb88d3
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/.DS_Store
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..74a7f47
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,3 @@
+# Contributing
+
+Contributions are welcome! Create an issue, explaining a bug or proposal. Submit pull requests if you feel brave.
diff --git a/LICENSE.md b/LICENSE.md
new file mode 100644
index 0000000..81798b5
--- /dev/null
+++ b/LICENSE.md
@@ -0,0 +1,12 @@
+Copyright (c) 2017, Dynamic
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..5979e94
--- /dev/null
+++ b/README.md
@@ -0,0 +1,24 @@
+# SilverStripe File Migration Task
+
+### Summary
+This Build Task allows for traversing a directory recursively and migrate those files into the SilverStripe filesystem. The task checks against the allowed extensions on [`File`](https://github.com/silverstripe/silverstripe-assets/blob/1/src/File.php#L165-L185).
+
+## Requirements
+
+* SilverStripe Assets ^1.0
+
+## Installation
+
+`composer require dynamic/silverstripe-file-migration-task`
+
+## Usage
+
+### Configuration
+
+```yaml
+Dynamic\FileMigration\Tasks\FileMigrationTask:
+ # Path to directory with files (required)
+ existing_file_system_path: '/path/to/your/files'
+ # Base folder to create in Assets (optional)
+ base_upload_folder: '/uploads'
+```
\ No newline at end of file
diff --git a/_config/config.yml b/_config/config.yml
new file mode 100644
index 0000000..bf3b2a2
--- /dev/null
+++ b/_config/config.yml
@@ -0,0 +1,6 @@
+---
+Name: dynamic-file-migration-config
+---
+SilverStripe\Assets\File:
+ extensions:
+ - Dynamic\FileMigration\Extensions\FileDataExtension
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..b047ae3
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,45 @@
+{
+ "name": "dynamic/silverstripe-file-migration-task",
+ "type": "silverstripe-vendormodule",
+ "description": "Sync files with the File table",
+ "keywords": [
+ "silverstripe",
+ "File",
+ "BuildTask",
+ "Migration"
+ ],
+ "license": "BSD-3-Clause",
+ "authors": [
+ {
+ "name": "Dynamic",
+ "email": "dev@dynamicagency.com",
+ "homepage": "http://www.dynamicagency.com"
+ }
+ ],
+ "require": {
+ "silverstripe/assets": "^1.0@dev"
+ },
+ "require-dev": {
+ "phpunit/PHPUnit": "^5.7",
+ "squizlabs/php_codesniffer": "*"
+ },
+ "config": {
+ "process-timeout": 600
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Dynamic\\FileMigration\\": "src/"
+ }
+ },
+ "minimum-stability": "dev",
+ "prefer-stable": true,
+ "scripts": {
+ "lint": "vendor/bin/phpcs src/ tests/",
+ "lint-clean": "vendor/bin/phpcbf src/ tests/"
+ }
+}
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
new file mode 100644
index 0000000..1f36b0e
--- /dev/null
+++ b/phpcs.xml.dist
@@ -0,0 +1,24 @@
+
+
{$message}
"; + } else { + echo "{$message}
"; + } + } + } +}