FileTools : Some tools to work with files

1. Introduction

Description: The name of extension is FileTools and features are similar to its name.
It provides tools to work with Files and Folders.

Latest Version: 10.1
Released: September 27, 2019
Last Updated:  October 9, 2021

2. Blocks

image
image
image
image
image
image

3. Documentation

component_method

Returns path to application specific directory
Thanks to @bodymindpower for suggesting changes


image

Returns a list of available storage directories.


blocks%20(18)

Copies file from source to destination folder.


blocks

Copies file from source to destination asynchronously.Use this to copy big files to avoid runtime errors.


component_method%20(2)

Creates Application Specific Directory in case it does not exists


blocks (1)

Creates a single directory.It triggers ‘Directory Created’ with boolean true or false


image

Deletes given file or folder.If it is directory then all subdirectories will be deleted and this can take some time.It triggers ‘FileDeleted’ event with boolean true or false.


blocks%20(21)
blocks%20(22)

Returns true if file or folder exists else false


blocks

Returns files list from given directory (if it exists) .Use file extension as filter like mp3,txt,etc.If you don’t want to use filter then use empty string.Also if don’t want to get subdirectories then set ‘withFolders’ to false else true.If recursive is set to true then it will also get files from subdirectories recursively.


blocks (1)

Works same as FilesList but it gets file list asynchronously which denies any oppertunity of runtime error in getting files list from a directory having so much files.It raises ‘GotFileList’ event with files list.


image

Returns file list from assets


blocks (4)

Returns file name from path if it exists


blocks (5)

Returns current size of file or folder


blocks (6)

Returns file path from file name.In this case it will return /storage/sdcard/mFile.txt


blocks (7)

Returns folders list of given directory


blocks (6)

Returns free size of directory in bytes.
Note: it uses absolute file Path


blocks (16)

Converts file path to content uri


blocks (18)

Moves file from source to destination asynchronously.


blocks%20(26)

Checks that given path is complete path or not
For example: /testt.txt and /mnt/sdcard/Android/com.sunny.notez/files/testt.txt are not same.


blocks (15)

Returns that folder/file is executable or not


blocks (14)

Returns true if path is file else false


blocks (13)

Returns true if file/folder is hidden else false


blocks (11)

Returns true if file/folder is readable else false


blocks (12)

Returns true if file/folder is writable else false


blocks%20(46)

Last modified time of file/folder in given format


blocks%20(47)

Mime type of given file.In above case it will return text/plain


blocks%20(48)

Moves file from source to destination and deletes source file


blocks%20(49)

Converts content uri to file path


blocks (10)

Renames file without deleting it


blocks (7)

Returns total space of directory
Note: it uses absolute file Path


4. Downloads

Hope it helps!

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments