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 and Folders.
Latest Version: 6
Last Updated: 2020-04-05T18:30:00Z
An image of blocks…
It has total 29 method blocks and 5 event blocks
A brief documentation for FileTools:-
Returns path to application specific directory
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 in case it does not exists
Creates a single directory.It triggers ‘Directory Created’ with boolean
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
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.
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
Returns file path from file name.In this case it will return /storage/sdcard/mFile.txt
Returns folders list of given directory
Returns free size of directory in bytes.
Note: it uses absolute file Path
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
Note: it uses absolute file Path
4.Aix and Aia File
Download Link1: FileTools (1).aia (51.3 KB)
Download Link2: https://drive.google.com/open?id=1fIfa91MAe6pRzAROlpwKwxHp5ot3kG3B
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
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
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 from file name (Thanks to App Inventor)
- Some other minor changes
- Added ‘recursive’ in FilesList and FileListAsync
- Fixed bug in Delete method
- Fixed bug in getting assets list using FilesList.Use
//in FilesList as dir to get Assets list while using Companion
- Some minor bug fixes
- Removed some un-neccessary methods and imports which reduced aix size (40 kb to 31kb)
- Some internal changes like using empty string in any path socket will also return an empty string
- Fixed several spelling and grammar mistakes