LXD PHP Client Documentation v0.0.1
Methods
  • __construct(array $config, variable $curl)  :  void
    Class construct
  • read(string $name, string $filepath)  :  string
    Read the contents from a file in container.
  • write(string $name, string $filepath, string $data, variable $mode, int $uid, int $gid)  :  array
    Write to or Create a file in container.
  • delete(string $name, string $filepath)  :  array
    Delete a file in container.
Methods Details
  • public function __construct(array $config, variable $curl)
    Class construct
  • public function read(string $name, string $filepath)
    Read the contents from a file in container.
    $lxd->containers->files->read('conainer-name', '/path/to/file');
  • public function write(string $name, string $filepath, string $data, variable $mode, int $uid, int $gid)
    Write to or Create a file in container.
    $lxd->containers->files->write('container-name', '/path/to/file', 'File Contents', 0644, 0, 0);
  • public function delete(string $name, string $filepath)
    Delete a file in container.
    $lxd->containers->files->delete('container-name', '/path/to/file');