composer.json
"require": {
"axelpal/selectel-storage": "~2.0",
}
<?php
require_once("vendor/autoload.php");
$selectelStorage = new axelpal\selectel\storage\SelectelStorage("user", "pass");
$container = $selectelStorage->createContainer('selectel', array("X-Container-Meta-Type: public"));
// get container info
$container->getInfo();
$containerList = $selectelStorage->listContainers();
$container->createDirectory('php/test');
$dirList = $container->listFiles($limit = 10000, $marker = null, $prefix = null, $path = "");
// files
$fileList = $container->listFiles($limit = 10000, $marker = null, $prefix = null, $path = 'php/');
$res = $container->putFile(__FILE__, 'example.php',["Content-Type: text/html"]);
$fileInfo = $container->getFileInfo('example.php');
$file = $container->getFile($fileList[0]);
$copyRes = $container->copy('example.php', 'php/test/Examples_copy.php');
$copyRes = $container->createLink('links/example.php', 'example.php');
$deleteRes = $container->delete('example.php');
$format = null;
$timeoutInMilliseconds = 5000;
$selectelStorage = new axelpal\selectel\storage\SelectelStorage("user", "pass", $format, $timeoutInMilliseconds);