Well,I am using Rails 2.02 and ruby 1.8.6 in my application,I need to provide a feature to extract the zip file into dynamic destination folders.i.e Destination folder name is fixed based on that it has to search on PC for that folder and extract zip file into that PC.
For example,
In PC1 the destination folder path is C:/sites/myfolder
In PC2 the destination folder path is D:/demo/for/myfolder
In PC3 the destination folder path is C:/myfolder
In PC4 the destination folder path is F:/path/to/myfolder
Here,In this example my destination folder is myfolder,so in the above four cases the path is different for that.What I need was my rails application should search for the folder in pc and extract zip file into that.
Thanks for the help!
Related
In both Hydrogen and using a plug-in terminal platform, the default directory is one folder up from where my code file resides.
E.g., I’ll be working on a file with path, say, parent/code/file.py. When I run pwd in the plug-in's terminal or the equivalent via Hydrogen in the python script I get parent/, but I need it to be parent/code/ to import files etc.
Perhaps the default directory for Atom is the project that is folder of the project that is open?
Any ideas how to change the default current directory for Atom (or is it package specific) to the file i’m working on/executing in Hydrogen?
In the hydrogen settings you can choose the location where the kernel should be started.
The default is the 'First started project's directory'. You can choose 'Current directory of the file' there, which should give you what you want.
When I develop apps, I am placing many image files under the root path (the directory which has my project name) on Xcode. I also can see them with Finder in the directory under the root (project name) folder.
I want to know in which directory those image files are copied when users installed the app on their devices, in this case.
I am trying to find those image files with NSHomeDirectory() but failed.
Thank you in advance.
NSBundle.pathForResource() will give you the right path.
I have a Grails application in which I generate PDF/Excel files in a folder.
My problem is, everytime I need to change the directory path through code when I test or run the code on different machines like Windows, Linux, Mac.
So what is the generic path, which will be applicable for any/all platforms as the default temp directory, so that I won't need to manually set path for the directory while running code on different machines/platforms.
The temp directory is available via
String tempDir = System.getProperty('java.io.tmpdir')
To create temp files in the default location for the OS you can use File.createTempFile(prefix,suffix)
It is possible, and if so how, to use tar to extract a zip while preserving the directory structure? Currently it just extracts everything into a single directory using the path as the file name.
Example file name
Farlex.581429F59E1D8_1.5.1.9_neutral__wyegy4e46y996.main\Assets\buttons\add.png
I have a project in directory A and files that I use in all my projects are in directory B.
When I moved a .sty file from A to B, the main .tex file does not compile anymore.
The error is that the .sty file was not found. I am puzzled because:
Directory B is included in the path of the project.
I cleaned (deleted manually) all the auxiliary files used in the previous compilations.
I refreshed the project folders .
Did anyone had similar problems? Suggestions?
The file LaTeX.sublime-build, within the Sublime Text folder . . . /Packages/LaTeXTools, contains a $PATH for different operating systems.
For example, Sublime Text 2 on an OSX operating system, has a file located at ~/Library/Application Support/Sublime Text 2/Packages/LaTeXTools/LaTeX.sublime-build. The relevant line of code for a MacTeX TexLive 2012 installation is "path": "$PATH:/usr/texbin:/usr/local/bin",. The plugin LaTeXTools looks in that path for *.sty files that are a part of the TexLive installation. While it may be possible (under some circumstances) to place the *.sty files within the working directory of the *.tex file, this particular plugin looks to the path mentioned hereinabove. So one option would be to add additional locations to the $PATH to suit the needs of the user, or simply place the *.sty files within the path that is pre-defined by the plugin developer.