Overview

Namespaces

  • None
  • PHP
  • Pry
    • Auth
      • Interfaces
    • Config
    • Controller
    • Date
    • Db
    • Feed
      • Abstracts
      • Writers
    • File
      • Decorator
    • Form
      • Element
    • Image
    • Log
      • Writer
    • Net
      • Exception
    • Session
    • Util
    • Validate
      • Validator
    • View

Classes

  • Crypt
  • FileCSV
  • FileManager
  • FolderManager
  • Upload
  • Util
  • Overview
  • Namespace
  • Class
  • Tree

Class Util

Utilitaire pour fichier / dossier

Namespace: Pry\File
Package: File
Category: Pry
Author: Olivier ROGER <oroger.fr>
Version: 1.1.0
Located at File/Util.class.php
Methods summary
public static string
# getExtension( string $file, boolean $dot = false )

Retourne l'extension d'un fichier avec ou sans le point

Retourne l'extension d'un fichier avec ou sans le point

Parameters

$file
string
$file Nom de fichier
$dot
boolean
$dot Afficher ou non le point dans l'extension

Returns

string
public static string
# getName( string $file )

Retourne le nom de fichier sans l'extension

Retourne le nom de fichier sans l'extension

Parameters

$file
string
$file

Returns

string
public static unknown
# getNameFromPath( string $path )

Retourne le nom dufichier/dossier compris dans un chemin

Retourne le nom dufichier/dossier compris dans un chemin

Parameters

$path
string
$path

Returns

unknown
public static integer
# getOctalSize( string $size )

Retourne la valeur en octet d'une taille courte (2K, 2M, 2G)

Retourne la valeur en octet d'une taille courte (2K, 2M, 2G)

Parameters

$size
string
$size Taille courte. Accepte les unités K,M,G

Returns

integer
public static string
# getHumanSize( integer $size )

Retourne une taille en octet sous forme lisible

Retourne une taille en octet sous forme lisible

Parameters

$size
integer
$size

Returns

string

Since

1.0.1
Pry API documentation generated by ApiGen 2.8.0