Skip to content

Latest commit

 

History

History
133 lines (76 loc) · 2.3 KB

readme.md

File metadata and controls

133 lines (76 loc) · 2.3 KB

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