I need in Chrome extension these actions:
Download binary file to temp
Unzip it (it's clear .zip package)
Move files from unpacked directory, to directory of my extension
Delete temp files
I've been looking for similar what Firefox Scriptable XPCOM interfaces offer, https://developer.mozilla.org/en/XPCOM_Interface_Reference
Is there any simple way to do this, or I need to create the components myself in C/C++ and one of NPAPI, PPAPI, NSPR ?
Related
I'm making a chrome extension for the first time.
For my extension, I want it can automatically download images to its extension folder. For example, if the extension folder is /xxxx/abc/, I want it can download images to /xxxx/abc/image/.
To make it, I don't know how to write file/ download image to this directory. I don't want users notice this.
I found an extension can make it. It's called Momentum. It can download images to /xxxx/<extension root dir>/backgrounds/.
Can anybody tell me what technique do I need? Thanks a lot!
No, you can't. An extension has only read-only access to own files.
Instead, you can download to a virtual HTML5 filesystem and use files from it. See this tutorial - the big red warning means no other browser uses this technology, but Chrome does.
You may want to declare "unlimitedStorage" permission to make sure you have the space to store the files.
This being a virtual filesystem, those won't actually be files you can open on your disk. If you need to give files to the user afterward, you can use chrome.downloads to write them to the downloads folder, but that's "write-only", you can't access the contents afterwards.
I would like to know how to create a jar file that preserves the file permissions of its content.
I'm packaging up source and executables in a jar file that will be extracted before use. People should be able to immediately run the examples and demonstrations by running batch / shell script files. Then they should be able to modify source and re-compile everything.
I'm trying to make life easy for people who use it and this includes people who are new to Java and programming who might be working on Linux / Unix.
I have access to machines running Windows and Linux. I don't use Linux a lot so maybe I've done something wrong.
I created a jar file on Linux using jar cf .... after setting permissions on the files so that everything worked as needed. Then I created a new test directory and extracted the jar file contents into it. The file permissions were not preserved ... i.e. -rw-rw-r--
The jar tool doesn't store file permissions, so you can't recover what has not been stored. jar format is not intended to archive files and metadata as zip or tar, it is a simple container to embed java files for an application.
Is there a proper way to create expansions files for iOS and Android apps using the command line tool (haxe or lime) or is it always just by manually making a .zip file and renaming it to match the correct pattern?
I do the same thing. I also made an extension with a tool for this that simplifies the command. In addition to zipping and pushing the obb file to your device for testing, it also has the suggested google libraries to handle downloading the OBB in the case that the APK is downloaded and not the obb. https://github.com/thomasuster/android-expansion
I have recently downloaded extension library as a Zip file from openNTF which has several other zip files. At present i don't have the Jdbc RowSet and related ExLib controls in the control pallete in DDE. How to make use of the zip files i downloaded?
I am wondering if there is a way to intercept files being downloaded from Chrome and rename them before they are saved in the downloads folder. If this is possible, can the download location be altered? Thanks!