Once again I am here to present my second extension to community.
Probably you have read in title , the name of extension is FileTools and features are similar to its name.
It provides tools to work with Files (folders also).
Latest Version: 4
Last Updated: 2020-02-15T18:30:00Z
A wide range of blocks…
It has total 32 function/method blocks and 5 event blocks
A quick documentation for FileTools:-
Path to application specific directory i.e., /storage/emulated/0/Android/date/
Thanks to @bodymindpower
Returns a list of available storage directories.
Copies file from source to destination folder.
Copies file from source to destination asynchronously.Use this to copy big files to avoid runtime errors.
Creates Application Specific Directory (/storage/emulated/0/Android/data/
<package name>/files) in case it does not exists
Creates a single directory.It triggers ‘Directory Created’ with boolean
Note:It can not create parent directories.In this case, this will not work if ‘data’ does not exists
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
Returns true if file or folder exists else false
Gets file extension(mp3,mp4,txt,etc) of file.
Note: Sometimes it can return
.fileif it is unable to get file extension
Returns files list from given directory (if it exists) .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.
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.
Returns file list from assets
Returns file name from path if it exists
Returns current size of file or folder if it exists
Returns file path from file name.In this case it will return /mnt/sdcard/mFile.txt
Returns folders list of given directory
Returns free size of external storage in bytes.
Converts file path to content uri
Moves file from source to destination asynchronously.
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.
Returns that folder/file is executable or not
Returns true if path is file else false
Returns true if file/folder is hidden else false
Returns true if file/folder is readable else false
Returns true if file/folder is writable else false
Last modified time of file/folder in given format
Mime type of given file.In above case it will return text/plain
Moves file from source to destination and deletes source file
Converts content uri to file path
Renames file without deleting it
Returns total space of directory
Returns free space of directory
Here are two download links:
1.Download link 1: com.sunny.filetools.aix (33.3 KB)
2.Download link 2: File_Tools.aix - Google Drive
And a shortened download link for those who likes my work:
Download Link3: MiniURL
It was not only me who was included in making this extension.
A lot of people helped me to make this extension.
I want to say thank you @Deepanshu_Arya and @Wizard for helping me in making FileTools
Also I am very thankful to App Inventor as AI source files helped me very much in adding new methods
StackOverFlow also helped me a lot in making FileTools
And a lot of thanks to @KodularCreator for this awesome platform
@bodymindpower for reporting some bugs and changes
ChangeLog Version 2
Added two new blocks
- All methods returning files list will now return empty list(if files list is empty) instead of runtime error
- Mime Type method will return mime type with more accuracy.
- Fixed some null pointer exceptions
ChangeLog Version 3
Added three new blocks
New version includes changes in some blocks
- ‘Application Specific Directory’ now returns path to ASD
- Replaced ‘File’ with ‘FileSystems’ in ‘Available Storage Directory’ block but I am not sure it is working or not
- Some changes in ‘Available Storage Directory’ block
Added 6 new blocks:
- Replaced path with name.Now it will find path automatically from file name (Thanks to App Inventor)
- Some other minor changes