In a mobile how can I let the user choose the filename and directory to download with write.table - forms

In a shiny app how can I let the user choose the filename and directory to download with write.table

Related

Flutter - Where should I save downloaded files?

I am building a flutter app (iOS/Android/MacOS/Windows/Web) which is able to download files, selected by the user. But where should I save those files? On MacOS/Windows its easy using path_provider and get the path of the downloads folder.
But where should I save the files on the other platforms? The downloads folder would be perfect because the users are able to use those files (.pdf) even without using the app, so the files are not app specific.
If you wish to save in download directory you can use
Directory appDownloadDir = await getDownloadsDirectory();
String appDownloadPath = appDownloadDir.path;
Or
getExternalStorageDirectory()//android
getApplicationDocumentsDirectory()// ios doesnt support access to download folder

How do I save files downloaded in my app to Downloads folder in Files app in Swift 4.2?

Is it possible to save the files downloaded from my app to be stored in the Downloads folder in Files App?
I am successful in creating my app folder in "On My iPhone" in Files and saving the files there.
However, my requirement is to save it in the Downloads folder in Files.
Is this possible? If so, how do I achieve this?

How to set .realm file on realm

I'm developing an app using realm. then I want to initialize realm by a set .realm file on the app. It is initially on /Users/*****/Library/Developer/CoreSimulator/Devices/~****~/Documents/default.realm/
I want the default.realm file on the app folder aligned with storyboard and ViewController.swift and other files.
How can I solve this?
You can pass a fileURL in the Realm init method
let config = Realm.Configuration(
// Get the URL to the bundled file
fileURL: Bundle.main.url(forResource: "MyBundledData", withExtension: "realm"),
// Open the file in read-only mode as application bundles are not writeable
readOnly: true)
// Open the Realm with the configuration
let realm = try! Realm(configuration: config)
See the documentation for more information. There are more things you can configure here too.
Important note: See the comment in the code above:
Open the file in read-only mode as application bundles are not writeable
To have the realm file sitting in your bundle, you would not be able to write to it, it would be read only. If you want to ship a pre-filled database with your app you can do this in your bundle but if you want it to be writeable you would need to copy it to the documents directory of your app on first launch and then use the version in that directory instead.
resources/files that you add in xcode and include in the 'copy bundle resources' in the build settings are included in your bundle. The bundle is not writeable. To ship a file with your app that you need to be writeable would need to be moved to a suitable folder. usually the app documents folder.

How to set a custom folder with `UIFileSharingEnabled=YES`?

I have added UIFileSharingEnabled = YES into application's .plist-file. And now I may see a folder on iTunes on device settings (tab "Applications"):
My Folder
But I need to get access to files inside this folder.
File1.txt
File2.txt
How to change a folder from the root to my folder on iTunes?
You can't. iTunes only shows the contents of the app's Documents directory. iTunes doesn't let a user view the contents of folders inside Documents.

load local asset bundle through www

I am new to unity3D gonna develop a standalone game from webplayer based game. so the webplayer game download the assets folder from server but according to standalone no need to download assets from server. so how can i load local bundle to run the app. i have folder name "Bundle " which contain the bundle package.
If your Bundle folder is in Assets/Resources you can use Resources.Load() to load them. AND(!) they are compiled into your game.
If you want to use WWW to load local files use file://
var FilePath = "file://" + Application.dataPath + "/Bundle/image.jpg";
And point WWW to this path.