Skip to content

Ceicom/ceicom_imgdrive

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

handle-file

Class with functions to handle files

Meta

  • author: Keller Kichel

adjustPath

Remove base folder from the passed folder path

Parameters

Examples

// return "media/noticias/diversas/imagem.jpg"
handleFile.adjustPath('C:/Compartilhada/media/noticias/diversas/imagem.jpg', 'C:/Compartilhada');

Returns String Clean path

addExtension

Add extension to allowed extension list

Parameters

  • ext String Can be comma separated strings

removeExtension

Remove extension from allowed extension list

Parameters

  • ext String Can be comma separated strings

dealPaths

Adjust path to return a JSON Object

Parameters

Returns Object JSON Object

dealFiles

Get only the files with allowed extension

Parameters

Returns Array Allowed files

Meta

  • deprecated: since version 1.1

checkExt

Validate extension with allowed extension array

Parameters

Returns Boolean