symlink

listFiles() of File not working on symbolic links?

对着背影说爱祢 提交于 2019-12-04 11:23:02
问题 I have the following File object pointing to a directory via symbolic link, File directory = new File("/path/symlink/foo/bar"); String[] files = directory.listFiles(); listFiles() returns null, is this because of the symlink? if yes, how will I go about this if I really want to list the files in bar using the path that contains a symlink? 回答1: According to what I've seen while Googling this puzzling behavior, Java requires that you call .getCanonicalFile() on a File whose path contains a link

Creating symlinks when packaging a Library (Debian)?

こ雲淡風輕ζ 提交于 2019-12-04 10:35:48
I'm trying for the first time to package for Debian a small library. For this, I'm using the official Debian Policy manual but since two days I encounter an issue than I cannot fix. This is the way I'm packaging : Creating the tarball (here libvl_1.0.orig.tar.gz) Using dh_make to generate the debian conf file in the debian directory Modifying the control file, changelog and copyright properly. Building the package using the dpkg-buildpackage command. Up to here, there is no problem. But as it is a library, I need to create some symlinks while installing it, this related to the SONAME of the

What is the windows equivalent to the ln -s <target folder> <link folder> unix symbolic link command?

丶灬走出姿态 提交于 2019-12-04 08:21:01
I'm attempting to follow the following tutorial for creating a program environment for the Twilio and App Engine library. https://developers.google.com/appengine/articles/twilio I'm good up until the point it says: Link the Twilio library and its dependencies into your project: $ ln -s venv/lib/python2.7/site-packages/twilio . $ ln -s venv/lib/python2.7/site-packages/httplib2 . $ ln -s venv/lib/python2.7/site-packages/six.py . I've researched and it appears I'll be using something along the lines of mklink /d venv\lib\python2.7\site-packages\twilio . if I've understood correctly I basically

Nodejs + npm, installing modules on ntfs partition

為{幸葍}努か 提交于 2019-12-04 07:37:30
问题 I have a problem when installing npm modules. NodeJS is installed on Ubuntu 11.10 running on Virtual Box on Windows host. My project files are on NTFS partition (I have to share them with windows). When I try to install some npm module I get an error, and module is not installed. I've found out that problem occurs when npm tries to create symbolic links. Probably you can not create symlinks on NTFS partition, when I'm installing module "inside" Linux file system, everything works fine. How

Controlling eGit's treatment of symbolic links

可紊 提交于 2019-12-04 04:25:36
I am setting up a project that will be shared among several programmers at my organization. We are using git--to which I am a newcomer. The project directory includes symbolic links to documentation directories that should not be under version control. I want to maintain the symlinks under version control as symlinks, rather than having them dereferenced and all of the content of the symlinked directory placed under version control. I find that the git command line tool behave the way I want: git add -A . However if I try to use the Eclipse version of git, eGit, to add all the currently

Set apache documentRoot to symlink (for easy deployment)

淺唱寂寞╮ 提交于 2019-12-04 03:09:16
we are looking for a way to point our Apache DocumentRoot to a symlink. E.g. DocumentRoot /var/www/html/finalbuild finalbuild should point to a folder somewhere like /home/user/build3 when we move a new build to /home/user/build4 we want to use a shell script that changes the symbolic link "finalebuild" to this new directory /home/user/build4 and do an apache graceful restart to have a new web application version up and running with little risk. What's the best way to create this symlink and to change this link afterwards using the shell script? We're using capistrano to employ a similar setup

.htaccess config with symbolic links and index files not working as expected

别来无恙 提交于 2019-12-04 01:36:34
Like a lot of web developers, I like to use .htaccess to direct all traffic to a domain through a single point of entry when the request isn't for a file that exists in the publicly served directory. So something like this: RewriteEngine On # enable symbolic links Options +FollowSymLinks RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+) index.php [L] This means if the request isn't for a css file or an image, my index.php gets the request and I can choose what to do (serve up some content or perhaps a 404) Works great, but I've stumbled upon an issue it

How to make a symlink in Java when running in Linux?

纵饮孤独 提交于 2019-12-03 22:54:16
How to make a symlink in Java/JVM when running in Linux? Are there any other ways to this than using Java Native Interface (JNI) or java.lang.Runtime.exec("/bin/ln -s /some/path symlink") ? Creating a symlink is very platform dependant, but I mostly care about running on Linux, nice bonus would be if a shortcut would be created in Windows. The JDK 7 includes (via NIO.2 ) a class called Files that provides a createSymbolicLink() method. Previous versions don't provide any built-in way to produce that, so JNI or Runtime.exec() are your only real options. 来源: https://stackoverflow.com/questions

Symbolic links in TFS 2010 Source Control?

喜欢而已 提交于 2019-12-03 22:39:31
As far as I know, Team Foundation Server 2010's source control (and prior versions) doesn't support linking (Symbolic links) of files. Linking (per Visual SourceSafe) was the concept of providing one "hard" file in a folder, and then "linking" to it in other locations - exactly like file system hard links are designed. Does anyone know if files can be linked at all? I realise it is not a good practice in general, but I have some scenarios where it makes sense. According to an answer in this thread: Linking TFS source control folder from another TFS project it's not possible, but I can't find a

git commit symlink as a regular file

做~自己de王妃 提交于 2019-12-03 22:06:26
Suppose I have a file fname which is a symlink to a file from some other repository/project, say ../../proj2/fname . Is there a way to add/commit fname as a regular file? It seems that, by default, git gives the file mode 120000 and sets the path to the linked file as the blob content. I know this because git ls-tree shows mode 120000 for the file, and git cat-file -p shows ../../proj2/fname as the blob's content. Nope, Git knows it's a symlink. It'd be kind of dangerous for Git to pretend otherwise, since it would then end up writing to files outside the repo. Tracking it as a symlink is