Questions tagged [absolute-path]

global address for a file, independent from the working directory of the calling process

An absolute (or full) path is the general form of the name of a file or directory that specifies a unique location in a file system. An absolute path contains the root directory and all other subfolders in which the requested file or folder is contained.

833 questions
20
votes
2 answers

Confusion about URI path to configure SQLite database

Hi I am building a web application using Flask and Sqlite3. I had issues with connecting the database for a while and it did not work when I wrote this: #version 1 app.config['SQLALCHEMY_DATABASE_URI']…
bubble rain
  • 411
  • 1
  • 5
  • 10
20
votes
1 answer

Absolute (full) URLs without "http:" in HTML href

I have been seeing this a lot lately and I am unable to find any information on it. Is there a name for it? Which browsers support this?
Xen
  • 442
  • 1
  • 4
  • 13
19
votes
2 answers

How to get Java File absolute path from InputStream?

I'm on Java 6 and I have a method that scans the runtime classpath for a file called config.xml. If found, I would like to read the contents of the file into a string: InputStream istream =…
user1768830
19
votes
3 answers

How to get absolute path of file or directory, that does *not* exist?

How can I determine the absolute path of a file or directory from a given relative path in C/C++ on GNU/Linux? I know about realpath(), but it does not work on non-existing files. Let's say the user enters ../non-existant-directory/file.txt, and the…
Fabian Henze
  • 980
  • 1
  • 10
  • 27
18
votes
4 answers

Java: How to find out if path is absolute regardless of the OS

Is there anyway in Java to find out if the given path is absolute or not regardless of the platform the program is currently running. So, what I want is probably something like the following example: On Linux: new File("/home/").isAbsolute() //…
His
  • 5,891
  • 15
  • 61
  • 82
16
votes
1 answer

ts-node 'MODULE_NOT_FOUND' when using absolute imports in TypeScript

I stumbled upon a problem with absolute imports. The repository is publicly available here: https://github.com/repetitioestmaterstudiorum/ts-boiler When I'm trying to import a file with absolute path (relative to the project directory) and then…
16
votes
2 answers

Changing C# .dll references from absolute to relative

I have compiled my project and some of my project's added .dlls have absolute references. When I try to run my project on another machine, it looks for the .dlls from the original project path. How can I make the project look for the .dlls using a…
Oded .S
  • 1,081
  • 2
  • 11
  • 18
16
votes
6 answers

Why does the yocto bblayers.conf file use absolute paths?

The yocto project allows the use of relative path in most of its configuration files but not within the ./build/conf/bblayers.conf file. What is the reason for blocking the use of anything but absolute paths for the BBLAYERS and…
TafT
  • 2,764
  • 6
  • 33
  • 51
16
votes
2 answers

getting the absolute path of a

Using Javascript, is there a standard way to get the absolute path of an image? img.getAttribute("src") only returns the src attribute as it was declared in the HTML.
Pierre
  • 34,472
  • 31
  • 113
  • 192
15
votes
3 answers

Getting an anchor element's absolute URL with jQuery

Given an anchor element (with something like $("a:first")), how do you get the absolute URL that the anchor points to?
Chetan
  • 46,743
  • 31
  • 106
  • 145
15
votes
2 answers

Use Absolute path for ClassLoader getResourceAsStream()

I am trying to use ClassLoader getResourceAsStream() My Direcory structure is like below: Project1 -src -main -java -webapp -WEB-INF -MYLOC -someprops.properties For classloader.getResourceAsStream("MYLOC/someprops.properties") works…
user3018487
  • 153
  • 1
  • 1
  • 4
14
votes
3 answers

QDir mkdir with absolutepath

I have problem with the creation of dir with Qt. I would like to create a dir in documents'dir so, I make some things like that : QString path("C:/Users/Me/Documents/MyApp/profiles/"); Qdir dir = QDir::root(); dir.mkdir(path); But that doesn't…
Guillaume
  • 8,741
  • 11
  • 49
  • 62
14
votes
5 answers

Absolute vs. relative paths

If I use absolute paths, I can't move the whole directory to a new location. If I use relative paths, I can't move individual files to new locations. What's the solution here? Do you set up a config file that holds the root path and go from there?…
Frank Vilea
  • 8,323
  • 20
  • 65
  • 86
14
votes
1 answer

Relative path to absolute path in VB.NET

I am writing a VB.NET console application where it takes relative paths and spits out all file names, or an error for invalid input. I am having trouble getting PhysicalPath from relative path Example: I am in folder C:\Documents and…
Mehdi Anis
  • 358
  • 1
  • 9
  • 17
14
votes
3 answers

What is the difference between an absolute and a relative path?

I am asking because I am working on a project for school. Yes this is homework. But, I'm trying to understand a little bit more, though. This is one example of what is being asked. • When the user clicks the “Save” button, write the selected…
shan
  • 1,311
  • 4
  • 13
  • 17