Is it possible to prevent a file being renamed in the iTunes File Sharing? - objective-c

I have an app which uses a sqlite db, saving it in the Documents directory.
Moreover it allows users to create a csv file from the db and send it via email. This .csv file is also saved in the Documents dir.
I would enable the iTunes File Sharing, so users can also save these files on pc/mac (maybe in the future my app could also read the files added by the users).
I read that users can remove, save, add and rename files via iTunes File Sharing, but I noticed that I didn't succeed in removing my app files via iTunes File Sharing, I can only save/add and rename them.
If the remove isn't possible, this is good for my app, but the user can still rename the .sqlite file.
Is there a way to prevent a file being renamed in the iTunes File Sharing?

You can hide the sqlite file from iTunes File sharing by starting the filename with a dot (.)
http://blog.saers.com/archives/2010/06/28/hiding-files-from-itunes-file-sharing/
alternatively see the Library directory here
How can I get a writable path on the iPhone?

Related

How can I set security to download file in vue.js

I don't want guests are able to download files (pdf, word .etc).At first users must log in to download files. How can I get information about it?

Replacing a empty dropbox's (fresh install) folder with a previously (uptodate) dropbox folder. Is it possible?

I am about to install Maverick and before I do that I am going to reformat my macbook air. I use dropbox and have about 15gb of (small) files on it (mainly documents/ebooks).
My question is: Is it possible to backup my Dropbox folder now, reformat my SSD and and install dropbox again. After wish I replace the dropbox folder with my backup without getting Dropbox confused (It might think it are new files? So dropbox could upload them or/and download the same files again).
Does anyone got any experience with this?
It's fine to do this - I have done it myself, but not on OSX.
The Dropbox client will index the files that it finds on your computer and compare them to the ones which are already in your account (on the server). I believe that it uses some kind of hash function to do this - the client creates a small hash value for each file and then this value is compared to the value on the server. If the value is the same then the client assumes that the file is the same and it does not need to be re-uploaded. However, if you have thousands of files, this can take some time.
Source: https://www.dropbox.com/help/1941/en - "The application will index the files and see that they are the same files in your account."
If you want to do it, when you install Dropbox again, you should sign-in to your account, let it create the Dropbox folder and then click "Pause Syncing" so that it doesn't start downloading everything. Then you should copy the backed-up Dropbox files into the new Dropbox folder and resume syncing.

Live Connect API Windows 8 app file source URL changing

I have an app that syncs data through a JSON file hosted on the users SkyDrive. I'm storing the URL to the file after it is created in the users Roam Settings, but it seems to change at some point and I can figure out what's going on. Do source URL's change randomly? When the file is overwritten perhaps?

How to download files from a web folder in vb.net

I have a web folder e.g. "http://www.myhost.com/software/" if I open this address in IE it show me all files which this folder have.
I want to download all files but I don't want to hard-code name of files. I know I can get the files with webclient.DownloadFiles(#address,#filename). Is this possible to download all files or at least get the name of files from the web folder?
As a minimum you can download the same file IE displays (note that this file is provided by your web server -- there is not a standard) and parse the HTML for the files yourself, e.g. using webclient.DownloadFile("http://www.myhost.com/software/", #listfilename).
To access the files more "professionally", you'll need to see if the server also allows access via FTP or WebDAV because HTTP does not have a file "interface".

How do I store different documents in production environment?

I'm working on a "UPLOAD DOCUMENTS" functionality where different customer can upload the required documents and employer should be able to view all the uploaded documents by the customers. Currently in my local system I can upload the documents and it saves the uploaded file to "inetpub" folder. But in order to provide "upload documents" feature to production environment what should be the path? Where Can these documents be saved?
Any suggestion is appreciated.
The files need to be accessible to users for download somehow. This is tricky however, as it opens you up to security issues if they upload an executable file and then request it.
What I normally do is keep the file information (name, type, etc.) in a database. Then, I name the file on disk with a consistent naming structure, such as UPLOAD_ASSET_123456, with no file extension. I also keep them out of the web root.
Then, to retrieve to the file from the web end, have a script that accepts an ID, and then the script echos the file contents.