i have a directory path of the computer and i will like to create a tree of that directory path.
For example, If i have a directory path of the desktop, i will like to create a tree of all the folders in the desktop and the subfolders.
The only way i can think of is to create a fileSystemTree object and set the directory to the path i want. If i were to set the directory as Desktop, it immediately show the folders under the desktop directory and not the Desktop root folder first.
So you'll need to use Tree control.
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7d80.html
The trick is going to be adding the child nodes at runtime upon clicking open. A dataProvider has several methods that you implement on a dataProvider for retrieving the children. That's not to hard by creating your own dataProvider, but that's the first step. Write a FileCollection that conforms to the model. Read the manual and it should be pretty easy.
Related
In PhpStorm (as well as other JetBrains IDEs, I'm sure), I'm setting up a File Watcher. In the Watcher Settings section, it asks me to specify the path to the program to be executed.
I want to use the executable file within the node_modules/.bin directory of my project. I don't want it installed globally because I may have other projects that use the same program, but may require a different version.
I could simply specify the absolute path to my project's node_modules/.bin directory, but then if I move the project, the file watcher will break.
In the Arguments and Output paths to refresh fields just below the Program field, it allows you to insert a macro, like $Projectpath$. This is exactly what I need, but it doesn't look like the Program field allows that.
Is there a way to specify a relative path for the Program field?
Here is a screenshot of the File Watcher setup window:
I could simply specify the absolute path to my project's node_modules/.bin directory, but then if I move the project, the file watcher will break.
That's not true -- at very least it does not break anything here -- got 3 projects that use local stuff.
Is there a way to specify a relative path for the Program field?
Sure. Use full path to the program :)
Internally (in config file) it will be stored using $PROJECT_DIR$ (AFAIK) special macro/variable but in actual field (in that dialog window) you will always see full path. Such conversion is done automatically.
You can read a bit more here (in comments): https://youtrack.jetbrains.com/issue/WEB-24376
If you are using the same project on different computers ... where path to the same program will be different but outside of the project (e.g. stored inside user-specific folder and user logins/names are different on such computers) ... you could use Path Variables functionality (Settings/Preferences | Appearance & Behavior | Path Variables) and specify the same variable on all of such computers that would point to correct path on that computer. IDE will automatically use that path variable to store the path.
So .. on one computer MY_TOOL_PATH will be pointing to /Users/Joe/MyTool and on another it could be /Users/Sam/AnotherTool.
I have an Oracle Forms application. In the menu options I need to provide an option to open another application. I am using Replace_menu (File_Name) option to change the menu options of the new application.
The fmx file which I need to invoke is in a different folder but in the same parent directory.
If I pass the whole path including the file name this options works fine, however if I try to use the relative path it fails.
Consider I have the following folder structure:
C:\Sample\Sup
Forms1 and Forms2 are 2 folders.
The first application is in Forms1. I need to invoke form_menu.mmx inside Forms2 folder.
eg: Replace_menu(c:\Sample\Sup\Forms2\form_menu.mmx) - This works fine.
eg: Replace_menu(../Forms/form_menu.mmx) - Does not work
You only have a few options:
Include the full path in the code
Include the fully qualified path in FORMS_PATH
Pass the path in at runtime as a parameter.
Relative paths are not permitted.
For controller_A's views, I currently use $this->element('repeatedly_used_html'); in the element folder for some .ctp files that are used more than once. However, some of the files in the element folder are entirely used for one controller, and the file are unorganized in the element folder.
So, for exmaple, controller_A has views that use files from the element folder. I would like these .ctp files for controller A's views to be contained in the app/views/A.. is there way to invoke a call similar to $this->element('repeatedly_used_html'); that will allow me to keep files the folder app/views/controller_A? I would like to avoid writing a very long .ctp file.
It looks like you're using CakePHP 1.3 based on your directory structure. If this is the case, you can do this by simply using the render() method instead of element(). This will render a template using the current view path (in this case, the controller you're in).
echo $this->render('repeatedly_used_html', false);
The second parameter is the layout, which we set to false to make sure the whole layout isn't rendered along with the view.
echo $this->element( 'subfoldername/viewfile' );
Then create the subfoldername directory in your elements folder.
Is there any way to get information about a file or folder on Box, given it's full path, but not ID?
For example, I'd like to check if /Foo/Bar/test.txt exists on Box. Currently, I have to start at the root and recursively walk through each folder level, searching for the next segment in the path.
As you can imagine, this process is very cumbersome when writing fully asynchronous code.
There currently is not a way to retrieve files or folders by path. This is something we may consider for the future, but don't have plans to implement it in the short term.
I need to visit a folder and all of its children with SSIS (SQL Server Integration Services). At the moment by setting the folder path into a variable after reading it, I able to loop through all the .txt files of the current folder and fill a pre-generated (with head info) xml file.
What I would need now is to be able to create one per each accessed folder, a new xml file (the beginning content will be always the same). Once I would be able to create it, as first action once a new folder is accessed, I can then simply apply the logic I developed so far.
However I am blocked at the moment, since within the loop where i read the files (with their full path) I cannot find a way to express "create the xml file if the accessed folder is new".
Assuming I understand the problem, you need to walk the entirety of a directory structure and for each folder you find, you need to create a base XML file. Then for each text file you find in that folder, you will perform some operation on the XML file. The trick being how do you only create the XML file once.
I would envision a process like this.
A script task that makes use of the System.IO.GetDirectories to populate a variable (directoryXML> that contains the folder structure, something like
<Dir>
<D>C:\ssisdata</D>
<D>C:\ssisdata\a</D>
<D>C:\ssidata\a\b</D>
</Dir>
Use a Foreach Nodelist Enumerator to shred that XML out into a variable (currentDirecotry).
You'd perform your one-time task of creating the XML file in currentDirectory.
Further using the currentDirectory variable as an expression on the Foreach File Enumerator (assign to Directory with a FileSpec of *.txt) you can then perform your task on all the files meeting that specification. Do not check the traverse subfolder option as that will not give the desired results.
This is a fairly high level approach to the problem as I'm assuming you have some familiarity with SSIS but the approach should be sound. Let me know if you have any particular sticking points.