How can I create hidden folder in windows with flutter? - windows

I created a folder to store user and program data and I keep some assets there. But I want to make the folder private so that users cannot access it from outside.

Related

Laravel - where to store files which I don't want to share with users

For example, I want to merge two .png files in one .png file, but I don't want to share those parts with user. Currently I am storing files in storage folder, but the problem is that storage folder is with .gitignore file as default. Of course I could allow to push it to git, but I suppose it's not a good idea, because there could be thousands of another files uploaded by the user. Now if I want to continue work from another computer I should move all my parts manually.
So what you could advice to me?
You can store it anywhere you want in your application.
For example, you can make a folder in your projects root called /uploads and then use one of laravel helper functions to specify where to save the file:
Example:
$save_path = base_path('uploads');
You can use the Laravel File Class to make sure the path exists with:
File::makeDirectory($save_path, $mode = 0755, true, true);
You will need to add use File; in the top of the file with all the class includes.
Later, to access said files you can make a View Composer which you can add logic to in order to limit who can view the file.
If you want to protect your files so that nobody can access without permission store all file into storage folder. Don't put your file in public folder.

What is the Purpose of c:\Users\Default\Documents folder?

I need to move some files into the Documents folder of some users of our software.
On Windows machines, there is a folder c:\Users\Default\Documents. What is the purpose of this folder? Who can read/write to this folder? I thought perhaps it was a "universal" documents folder, and anything there would show up for every other user, but I added a file and that didn't happen.
The Default User profile is a template profile for all created users. Whenever you create a new user profile, the profile is built based on the Default User profile.
The Public Folder is for sharing files with all other users that in the system, or on network. All local users can access this profile, but cannot access your private user profile.
Source: https://social.technet.microsoft.com/Forums/windows/en-US/dbb36882-8552-4d18-af95-c73a9a40a0d3/what-are-the-default-and-public-folders-in-cusers-for?forum=w7itprogeneral

Laravel 5 Filesystem: Create a Folder in a Folder

I'm programming a Filesystem Web App with Laravel at the moment and I can create folders and upload files. Now I want that when you are in a folder that you can create a new folder in the actual folder, so a folder in a folder.
Is there a way that you can save the actual path of the folder (maybe in a hidden text field or something) so the app know where you actual are and create a folder in a folder?
Assume that you are in the folder /foo/bar in your app interface, you can reflect your current location in a URL parameter, for example.
Something like this:
http://localhost/filesystem.php?current_path=/foo/bar
or if you have the URL rewriting enabled on your server:
http://localhost/filesystem/foo/bar
Now, you just need to retrieve the current_path parameter value in your controller's method and use it as you want.
And when you click on the baz subfolder in /foo/bar, update your URL parameter: ...?current_path=/foo/bar/baz. It's that simple.

how to get list of files in dropbox shared folder

I want to update my app's database with dropbox.
It should download some files and db file located in specific folder in my Dropbox account.
The algorithm is something like this:
1. App makes request to shared folder and downloads db by specified name(like myapp.db)
2. App reads db, get list of file to download and looking for them in shared folder
3. App downloads this files from shared folder
Is it possible? I don't want to show any authentication requests to user, and actually user can't be authenticated since he just get access to shared folder in my account.
Can I do this with Dropbox API?
platform is os x
You don't need to use the Dropbox API to do this. Just put the public URL for myapp.db into the app, and in myapp.db put all the URLs of the files. Then you're not even tied to Dropbox, since all you need is public URLs. Note that Dropbox has bandwidth limits, so if this is a heavily-used app, you might want to put these on a more appropriate host like S3. Using direct URLs gives you the flexibility to change hosts in the future.

In Laravel, what folder should I put a non-public data.json file?

I have another system that will drop in a data.json file somewhere onto my Laravel site/folder structure.
I want only Laravel to be able to be able to read the json file (i.e. a user can't see it by typing a url into a browser).
Where should this file go?
I'm currently torn between putting it in application/models folder or application/[new folder]. My webroot is set to the public folder, so you can't access the application folder via a browser.
If it is in there, I'm assuming I will be able to read it within php but not javascript (which is okay).
Just create a new folder in the app/ directory. Thats not visible to outsiders. Everything visible is in the public folder, as you said. If you create a new folder you can autoload it by setting up composer.json.

Resources