#!/usr/bin/env php
<?php
/**
 * Configuration for: Timezone
 */
date_default_timezone_set('America/New_York');

$autoloaded = false;
foreach ([
    dirname(__FILE__) . '/../vendor/autoload.php',
    dirname(__FILE__) . '/../../../autoload.php',
] as $file) {
    if (file_exists($file)) {
        require_once($file);
        $autoloaded = true;
        break;
    }
}

if (!$autoloaded) {
    throw new Exception('Unable to find composer autoload.php file.');
}

$app = new \Cilex\Application('Cloud Drive', '0.1.0');

$app->command(new \CloudDrive\Commands\MetadataCommand());
$app->command(new \CloudDrive\Commands\InitCommand());
$app->command(new \CloudDrive\Commands\SyncCommand());
$app->command(new \CloudDrive\Commands\ClearCacheCommand());
$app->command(new \CloudDrive\Commands\UploadCommand());
$app->command(new \CloudDrive\Commands\ListCommand());
$app->command(new \CloudDrive\Commands\DownloadCommand());
$app->command(new \CloudDrive\Commands\MkdirCommand());
$app->command(new \CloudDrive\Commands\TrashCommand());
$app->command(new \CloudDrive\Commands\RestoreCommand());
$app->command(new \CloudDrive\Commands\RenameCommand());
$app->command(new \CloudDrive\Commands\ListTrashCommand());
$app->command(new \CloudDrive\Commands\ResolveCommand());
$app->command(new \CloudDrive\Commands\MoveCommand());
$app->command(new \CloudDrive\Commands\FindCommand());
$app->command(new \CloudDrive\Commands\QuotaCommand());
$app->command(new \CloudDrive\Commands\UsageCommand());
$app->command(new \CloudDrive\Commands\ConfigCommand());
$app->command(new \CloudDrive\Commands\CatCommand());
$app->command(new \CloudDrive\Commands\TreeCommand());
$app->command(new \CloudDrive\Commands\DiskUsageCommand());
$app->command(new \CloudDrive\Commands\RenewCommand());
$app->command(new \CloudDrive\Commands\TempLinkCommand());
$app->command(new \CloudDrive\Commands\ListPendingCommand());

$app->run();
