Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • DateTime
  • Directory
  • File
  • Image
  • Mailer
  • SQL
  • YAML

Class Directory

Contains helper methods concerned with directory manipulation.

Namespace: Core\Helpers
Located at helpers/directory.php

Methods summary

public static boolean
# create( string $path )

Creates a directory and subdirectories, if not present.

Creates a directory and subdirectories, if not present.

Parameters

$path
Full or relative path to directory.

Returns

boolean
If the directory was successfully created.

Throws

DomainException
If directory already exists.

Uses

File::getFullPath To format path to file.
public static boolean
# delete( string $path )

Deletes a directory and all its subdirectories and files.

Deletes a directory and all its subdirectories and files.

Parameters

$path
Full or relative path to directory.

Returns

boolean
Result of the operation.

Throws

InvalidArgumentException
If path is empty or is not a directory.

Uses

File::getFullPath To format path to file.
self::delete To recursively delete subdirectories.
File::delete To delete files in directories.
public static boolean
# copy( string $from, string $to )

Copies a directory to another destination, recursively.

Copies a directory to another destination, recursively.

Parameters

$from
Full or relative path to directory.
$to
Full or relative path to destination directory.

Returns

boolean
If the directory and its contents were copied successfully.

Uses

File::getFullPath To format path to file.
self::create To create a directory.
self::copy To recursively copy subdirectories.
File::copy To copy files to the destination.
Silla.IO API API documentation generated by ApiGen