everth/rclonemanager

A PHP library to manage Rclone configurations and operations.

dev-main 2025-04-15 23:29 UTC

This package is not auto-updated.

Last update: 2025-04-16 22:13:33 UTC


README

Before using this package, ensure the following:

  1. Rclone Installed: You must have Rclone installed on your system. You can download it from the official Rclone website.

  2. Rclone in PATH: Ensure that the Rclone executable is available in your system's PATH. This allows the package to execute Rclone commands seamlessly.

Usage

To use this package, follow these steps:

  1. Install Dependencies: Ensure you have installed all required dependencies using Composer. Run the following command in your terminal:

    composer install
    
  2. Configuration: Copy the example configuration files from the config/ directory and customize them as needed. For example:

    cp config/drive.conf.example config/drive.conf
    
  3. Include Autoloader: Include the Composer autoloader in your PHP script:

    require_once 'vendor/autoload.php';
  4. Instantiate Rclone with Configuration: Use the Rclone class and provide the path to your configuration file. For example:

    use Rclone\Rclone;
    
    $rclone = new Rclone('config/drive.conf');
  5. Use Basic Commands:

    • List Files: To list files in a remote directory:
      $files = $rclone->listFiles('remote:path');
      print_r($files);
    • Copy Files: To copy files from one location to another:
      $rclone->copy('source:path', 'destination:path');