absolute-path

How to reference absolute path from jQuery in a .NET Application

I have some jQuery that writes some image tags to the browser, but I want to reference them such that I don't have to hardcode the path, and I'm not able to use relative paths either. This is a .NET application, and I am trying to use server side tags. So, I changed the following: $('#IMG_' + myID).attr('src','../images/plus.gif'); ...

Skip directory in msdeploy

I have a msdeploy in my nant script(Team City) that is working except it is copying some folders that I do not want to copy. What command will skip these directories? I tried: and None of these commands seem to work and the Build scripts directory is still copied fromm source directory to destination directory? The msbuild does a sync...

Absolute Path of Project's folder in Java.

Lots of confusion in this topic. Several Questions have been asked. Things still seem unclear. ClassLoader, Absolute File Paths etc etc Suppose I have a project directory structure as, MyProject-- --dist --lib --src --test I have a resource say "txtfile.txt" in "lib/txt" direct...

how to find the target file's full(absolute path) of the symbolic link or soft link in python

when i give ls -l /etc/fonts/conf.d/70-yes-bitmaps.conf lrwxrwxrwx <snip> /etc/fonts/conf.d/70-yes-bitmaps.conf -> ../conf.avail/70-yes-bitmaps.conf so for a symbolic link or soft link, how to find the target file's full(absolute path) in python, If i use os.readlink('/etc/fonts/conf.d/70-yes-bitmaps.conf') it outputs ../conf....

htaccess mod_rewrite referencing to full path directories

Is it possible to reference a full/absolute path directory, such as /usr/home/public_html/x in .htaccess mod_rewrite? I've tried the most obvious case of putting the following in the .htaccess of a subdomain (stored in a folder in public_html), hoping it'd map (not redirect!) onto the file as pointed by the absolute directory: RewriteE...

PHP Include calling other files.

I realized I used a particular function over and over again in my PHP files, so I took the function out of all of them and put it in a seperate PHP file and included it where I need it. Now when I make updates to the function, all the files that use it get updated. Great. Now there is just one problem, the function itself uses relative...

How to determine the directory in which a running Haskell script or application lives?

I have a Haskell script that runs via a shebang line making use of the runhaskell utility. E.g... #! /usr/bin/env runhaskell module Main where main = do { ... } Now, I'd like to be able to determine the directory in which that script resides from within the script, itself. So, if the script lives in /home/me/my-haskell-app/script.hs...

android get filename and path from uri from mediastore

I have an onActivityResult returning from an mediastore image selection which I can get a URI for an image using the following: Uri selectedImage = data.getData(); Converting this to a string gives this: content://media/external/images/media/47 Or to a path gives: /external/images/media/47 However I can't seem to find a wa...

MSBuild clean directory string

I have a property in MSBuild to represent the directory above the MSBuildProjectDirectory: <PropertyGroup> <BuildDir>$(MSBuildProjectDirectory)\..</PRSBuildDir> </PropertyGroup> I need to then use this property, but I need the directory string cleaned so that it doesn't include the ... In other words I need the .. evaluated, so t...

Sass (Ruby CSS compressor) absolute path parameters on Windows

I'm using sass (from haml-edge) for processing css files, and it crashes on absolute paths as parameters: K:\sass>sass.bat k:/sass/css/*.scss k:/sass/css/*.css --trace d:/Programs/Ruby/lib/ruby/gems/1.9.1/gems/haml-edge-3.1.62/lib/sass/files.rb:23:in `read': No such file or directory - k (Errno::ENOENT) from d:/Programs/Ruby/lib/ru...

getting the absolute path of a <img/>

Using javascript, is there a standard way to get the absolute path of an image, as var src= img.getAttribute("src"); only returns the @src tag as it was declared in the HTML thanks, Pierre ...

how to get absolute path for a image in drupal?

I have some images in drupal/sites/default/files/images/ How can get the absolute path for an image like abc.jpg placed in this directory. ...

Absolute to relative path (Eclipse, JSP)

I am making a web application in Eclipse (JSP) and use Tomcat as a server (integrated into Eclipse). I have to create the object below and specify the path to configuration file. This absolute path is working great: Store store = StoreFactory.create("file:///C:/Users/Aliens/workspace/myProject/WebContent/config/sdb.ttl"); However I am w...

How to check if directory exists at particular path programmatically in Objective-C?

Hello, Please tell me how to Get the current working directory's absolute path If this is the absolute path /Users/iphone/Documents/Archive how to convert this path to relative path? How to check if directory exists at patricular path programmatically in Objective-C and if it doesn't exist how to create it programmatically? i need t...

right path of image being referred to in exec() in php

Hi I am trying to use the following script to count the number of pdf pages in a pdf file. $filename = $_ENV{'HOMEDIR'}."/www/path/to/pdf/file"; $cmd = "/usr/local/nf/bin/identify -density 12 -format '%p' '$filename' "; $out = array(); exec($cmd,$out,$error); foreach($out as $f=>$v) { echo "$f = $v "; } However I get no outp...

django url path problem

I feel like there is a easy answer to this but I don't know it. I have a app that uses base template with a html link to the user's home page '../home/', but once you get 2 levels into the site, that link can't get back to the home page level. For example, the user logs in and goes to www.yadda.com/home. When a user selects a book (...

Absolute path issues in PHP on localhost in OS X

I'm having some issues with defined absolute paths in PHP. I define the SITE_ROOT and APP_PATH like so: defined('SITE_ROOT') ? null : define('SITE_ROOT', str_replace('//','/',dirname(__FILE__)) ); defined('APP_PATH') ? null : define('APP_PATH', SITE_ROOT.DS.'application'); When using the APP_PATH in an application like so: echo APP...

Is there a path similar to file:///android_asset/ that points to the apps directory?

I'm using a WebView to open some files saved to the app. Is there a way to link to the app's directory where files saved at runtime would be, in a similar way that file:///android_asset/ does? By link I mean loadUrl( *path* ) and also in the HTML markup of the file being opened <img src="*path*" /> As oppose to using an absolute path ...

Converting relative path into absolute path

Not sure if its a duplicate. Given the relative path, how do i determine absolute path using a shell script? Example: relative path: /x/y/../../a/b/z/../c/d absolute path: /a/b/c/d ...