Open folder vs create new project from existing files, located under shared network drive in PhpStorm - phpstorm

It's not clear to my why I should use the option in PhpStorm to create a new project from existing files instead of just opening a folder and declaring the project directory.
I have a web server installed and I can access it's root by a shared network drive. Now I can just open the a folder in PhpStorm and declare it's root. It will generate a PhpStorm project at the given directory.
But there is also an option to open a new project from existing files (located under shared network drive). My best guess is that this option is the way to go. Is this true and if so, why? Or if it doesn't matter, why doesn't it?
There will be several people using the same shared drive to work in different projects in the webroot.

You can, of course, create a project on mounted network drive via File/Open, but note that this is not officially supported. All IDE functionality is based on the index of the project files which PHPStorm builds when the project is loaded and updates on the fly as you edit your code. To provide efficient coding assistance, PHPStorm needs to re-index code fast, which requires fast access to project files and caches storage. The latter can be ensured only for local files, that is, files that are stored on you hard disk and are accessible through the file system. Sure, mounts are typically in the fast network, but one day some hiccup happen and a user sends a stacktrace and all we see in it is blocking I/O call.
So, the suggested approach is downloading files to your local drive and use deployment configuiration to synchronize local files with remote. See https://confluence.jetbrains.com/display/PhpStorm/Sync+changes+and+automatic+upload+to+a+deployment+server+in+PhpStorm

Related

Restore PhpStorm project from the Local History and cache files

I have an deleted project after format but I still have the cache and Local History files on my system in .PhpStorm2018.1 folder.
How can I restore the project using these files?
Caches and Local History are bound to a certain .idea folder. If you've lost it alongside with other project files, this data is useless.
Also, caches won't do anything in this situation, and Local History is being kept for 5 working days only.
Sorry.

How to only download specific files from remote server instead of whole project?

I created a new project from remote sources and entered my servers data. PhpStorm instantly began to download the whole Magento project, even though I only need specific files for development, e.g. I don't need all the images or cache folders for my purpose. Now it takes 4-5 hours to download the whole project.
In NetBeans you can choose which folders you want to download to your machine, is this also possible in PhpStorm?
Yes it's possible.
You should have marked such unwanted folders as "Excluded from Download" --
See official help page for appropriate wizard step.
Other ways of creating a project:
Just create empty local project and then configure the rest manually (deployment etc); once done use "Browse Remote Host" and download folders/files you need.
Another way -- download all needed files locally first using you preferred program (e.g. FileZilla) and then just point to the project root folder in "Open" dialog -- IDE will create new project from those files.

How could I automatically upload files from my directory to server? [duplicate]

An ASP.NET application (running on Windows server/IIS 7) has to transfer big size files uploaded by current user to an external SFTP server. Due to the file size the idea is to do this asynchronously.
The idea is that the ASP.NET application stores the uploaded file on a local directory of the Windows server. The current user can continue his work. A Windows service or a Quartz job (other tools(*)/ideas?) is now responsible to transfer the file to the external SFTP server.
(*) Are there existing tools that listen on changes of a Windows directory and then move the files on a SFTP server (incl. handling communication errors/retries)?
If there is no existing solution, do you have had similar requirements? What do we have to consider? Because the connection to the SFTP server is not very stable we need an optimized error handling with auto retry functionality.
To watch for changes in a local directory in .NET, use
the FileSystemWatcher class.
If you are looking for an out of the box solution, use the keepuptodate command in WinSCP scripting.
A simple example of WinSCP script (e.g. watch.txt):
open sftp://username:password#host/
keepuptodate c:\local_folder_to_watch /remote_folder
exit
Run the script like:
winscp.com /script=watch.txt
Though this works only, if the uploaded files are preserved in the remote folder.
(I'm the author of WinSCP)

PhpStorm configure to work remotely

Hi is there a way for PhpStorm to work directly on a remote server? No local files. Because as of the moment PhpStorm has local files wherein it just automatically uploads all files during save on remote.
My problem is if someone changes something remotely I need to manually download it first before seeing the changes.
It's not possible to fully operate on a remote server. Phpstorm need a local project, which contain the .idea folder. You can edit remote files without downloading them to the project folder. But in this case the entire list of features is not available.
For you can be useful the following settings:
tools->Deployment->Options:
warn when uploading over newer file
Notify about remote changes

Air: Write to application storage directory during installation?

I'm writing an Adobe Air HTML app. I want to write to the application storage directory during installation, and thought you could point me in the right direction.
I've got a set of example "profiles" (text files) to include with our application. I would like to put the examples into Application Storage (or Document Storage), since the user is free to delete them, modify them, etc. Also, I don't want to re-write the files during Updates, only an initial installation.
But as far as I can figure out, the installer only writes to the application directory. Is there a simple command line change to ADT to send files to the application storage directory?
Here's my thought so far for a workaround:
Include the files in the application directory "Examples"
On startup, check if the "Examples" folder is in the Application Storage/Document Storage directory
If it doesn't exist, copy app:/Examples folder into the Application Storage/Document storage directory
But it would be a lot easier if this was part of the installer. Let me know if any other information would be helpful. Thanks!
There isn't any way to customize the normal AIR installer. Your workaround is the way to do it.