absolute-path Questions

4

Solved

As per this documentation I created a jsconfig.json file in my root directory in order to be able to import components using absolute paths in my React Application (which was set up using create-re...

6

Solved

I'd like to construct an absolute path in python, while at the same time staying fairly oblivious of things like path-separator. edit0: for instance there is a directory on the root of my filesyste...
Brosy asked 2/7, 2013 at 15:2

13

Solved

I'm trying to do something like a C #include "filename.c", or PHP include(dirname(__FILE__)."filename.php") but in javascript. I know I can do this if I can get the URL a js file was loaded from (e...
Counterintelligence asked 12/2, 2010 at 23:0

29

Solved

I am writing a shell script that takes file paths as input. For this reason, I need to generate recursive file listings with full paths. For example, the file bar has the path: /home/ken/foo/bar ...
Adze asked 29/10, 2008 at 9:24

22

I am setting a configuration to run my tests in a create-react-app + typescript app (from which I have ejected). I am using jest + enzyme. In my tsconfig.json I have set baseUrl='./src' so I can us...

8

I need to implement functions to check whether paths and urls are relative, absolute, or invalid (invalid syntactically- not whether resource exists). What are the range of cases I should be lookin...
Obturate asked 12/9, 2011 at 18:33

4

Solved

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 us...
Crag asked 14/6, 2012 at 13:22

4

Solved

Given an anchor element (with something like $("a:first")), how do you get the absolute URL that the anchor points to?
Extrusive asked 30/5, 2011 at 1:54

9

Solved

Can I have absolute paths with forward slashes in windows in nodejs? I am using something like this : global.__base = __dirname + '/'; var Article = require(__base + 'app/models/article'); But o...
Peter asked 17/12, 2015 at 7:42

4

I open a file using std::ifstream. I may open file using relative path (file.txt) or absolute path (C:\test\file.txt). As I am passing a string as the file name, I dont know whether it is relativ...
Kettledrummer asked 11/6, 2010 at 12:31

4

Solved

Is there a way in PHP how to determine an absolute path given a relative path without actually resolving symlinks? Something like the realpath function but without symlink resolution. Or alternati...
Environmentalist asked 29/6, 2011 at 10:15

4

Solved

My question is: is it possible to get the absolute path of a resource (in a subdirectory of the res/ folder) in Android? Most of the answers I see to this question on google suggest getting a file...
Scincoid asked 10/6, 2011 at 2:52

4

I am trying to get ImageField absolute path in Django view so I can open the image, write on it something and then serve it to user. I have problem getting absolute path for the image which is sav...
Emaemaciate asked 2/4, 2013 at 12:51

6

In a create-next-app Next.js application, I want to move the pages folder in the root directory to a src folder. I added a jsconfig.json with the code (below), however now I get the error message &...
Slapup asked 23/10, 2021 at 17:19

5

Solved

I am trying to create links in my README.md that link to example code using a relative path, as opposed to the absolute path I am using now. For example, in the markdown file, if I use this: [some...
Peculation asked 8/8, 2012 at 15:59

0

Backstory: I am gradually converting an existing React Native project to TypeScript. Absolute paths have been working for years based on my babelrc configuration. Problem: Since adding TypeScript, ...
Franza asked 2/12, 2022 at 1:18

25

Example: absolute="/foo/bar" current="/foo/baz/foo" # Magic relative="../../bar" How do I create the magic (hopefully not too complicated code...)?
Frankforter asked 2/4, 2010 at 1:42

3

Solved

In my File-system my working directory is here: C:\temp\a\b\c\d and under b\bb there's file: tmp.txt C:\temp\a\b\bb\tmp.txt If I want to go to this file from my working directory, I'll use this...
Rescissory asked 8/8, 2016 at 12:22

1

Solved

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 pa...
Incandescent asked 13/6, 2022 at 9:8

5

Solved

I am using URL res = this.getClass().getClassLoader().getResource(dictionaryPath); String path = res.getPath(); String path2 = path.substring(1); because the output of the method getPath() retu...
Quarterphase asked 5/7, 2013 at 13:18

2

Given an absolute Uri and a relative Uri or relative path, how do you get the absolute Uri pointing to the relative location? For example, suppose we have the Uri for file:///android_asset/dir, po...
Dripping asked 15/9, 2015 at 15:37

5

Solved

I downloaded the linux Tor Browser package, which is a self-contained folder. I made a symlink to the run script: $ ln -s torbrowser/start-tor-browser ~/bin/torbrowser However, the link was brok...
Potsherd asked 19/7, 2013 at 2:10

11

Solved

How do I get the absolute paths of all the files in a directory that could have many sub-folders in Python? I know os.walk() recursively gives me a list of directories and files, but that doesn't ...
Pasol asked 22/3, 2012 at 5:16

3

Solved

TL;DR How can you tell SWC to compile CSS files imported in React components? How can you tell SWC to compile absolute imports in tests and in React components? Here is a minimal reproducible exa...
Aleshia asked 28/1, 2022 at 19:58

11

Solved

Given a path such as "mydir/myfile.txt", how do I find the file's absolute path in Python? E.g. on Windows, I might end up with: "C:/example/cwd/mydir/myfile.txt"
Pastose asked 9/9, 2008 at 10:19

© 2022 - 2025 — McMap. All rights reserved.