iTx Technologies offre gratuitement
cet espace pour SugarCRM !

title

Body

[fermer]

/include/utils/ -> file_utils.php (sommaire)

(aucune description)

Taille du fichier: 343 lignes (10 kb)
Inclus ou requis: 3 fois
Réferencé: 1 fois
Inclus ou requis: 2 fichiers
 include/utils/sugar_file_utils.php
 include/utils/array_utils.php

Defines 15 functions

  clean_path()
  create_cache_directory()
  get_module_dir_list()
  mk_temp_dir()
  remove_file_extension()
  write_array_to_file()
  write_encoded_file()
  create_custom_directory()
  generateMD5array()
  md5DirCompare()
  getFiles()
  readfile_chunked()
  sugar_rename()
  fileToHash()
  hashToFile()

Fonctions
Fonctions qui ne font pas partie d'une classe :

clean_path( $path )   X-Ref
Aucune description

create_cache_directory($file)   X-Ref
Aucune description

get_module_dir_list()   X-Ref
Aucune description

mk_temp_dir( $base_dir, $prefix="" )   X-Ref
Aucune description

remove_file_extension( $filename )   X-Ref
Aucune description

write_array_to_file( $the_name, $the_array, $the_file, $mode="w", $header='' )   X-Ref
Aucune description

write_encoded_file( $soap_result, $write_to_dir, $write_to_file="" )   X-Ref
Aucune description

create_custom_directory($file)   X-Ref
Aucune description

generateMD5array($path, $ignore_dirs = array('cache', 'upload')   X-Ref
This function will recursively generates md5s of files and returns an array of all md5s.

param: $path The path of the root directory to scan - must end with '/'
param: $ignore_dirs array of filenames/directory names to ignore running md5 on - default 'cache' and 'upload'

md5DirCompare($path_a, $path_b, $ignore_dirs = array('cache', 'upload')   X-Ref
Function to compare two directory structures and return the items in path_a that didn't match in path_b

param: $path_a The path of the first root directory to scan - must end with '/'
param: $path_b The path of the second root directory to scan - must end with '/'
param: $ignore_dirs array of filenames/directory names to ignore running md5 on - default 'cache' and 'upload'

getFiles(&$arr, $dir, $pattern = null)   X-Ref
Function to retrieve all file names of matching pattern in a directory (and it's subdirectories)
example: getFiles($arr, './modules', '.+/EditView.php/'); // grabs all EditView.phps

param: array $arr return array to populate matches
param: string $dir directory to look in [ USE ./ in front of the $dir! ]
param: regex $pattern optional pattern to match against

readfile_chunked($filename,$retbytes=true)   X-Ref
Function to split up large files for download
used in download.php

param: string $filename
param: int $retbytes

sugar_rename( $old_filename, $new_filename)   X-Ref
Renames a file. If $new_file already exists, it will first unlink it and then rename it.
used in SugarLogger.php

param: string $old_filename
param: string $new_filename

fileToHash($file)   X-Ref
Aucune description

hashToFile($hash)   X-Ref
Aucune description



Generé en: Thu Mar 4 09:44:50 2010 | Cross-referenced par PHPXref 0.7