Questions tagged [pathname]

Anything related to pathnames. A pathname is a symbolic, hierarchical representation of the location of a file (or other resource) in a filesystem encoded as a string. The rules governing the syntax of pathnames differ among OSes (and sometimes among filesystems). Here is an example for Linux: "/home/user/foo/bar/hello.pdf" and one for Windows: "D:\data\foo\bar\hello.pdf"

189 questions
-1
votes
1 answer

Escaping ../ in browser pathname

I'm currently working on some project in react and search query is represented as /search/:query. It works fine when query is "something", but I search for "something/../../else" it change url to "/else". Route doesn't change but url does. I use…
-1
votes
2 answers

Javascript that automatically fills in HTML file path for images

I'm trying to use window.location.pathname and injecting innerHTML to generate the file paths for an image so all I need to do is type fileName.png in a div in the html body and have the javascript generate the file path behind it so that it…
Matt
  • 3
  • 2
-1
votes
1 answer

Passing a path directory to a function in PowerShell

I am new to PS and I am trying to write a function which takes in parameters from a global variable. I want to pass a path name read from a .txt file into a function in the same script. function GetCorrectChildren ([string]…
-1
votes
1 answer

How to do condition for pathname?

Hi i need to do if Statement for pathname. That's how i trying to do this but it's doesn't work. if (pathname == "/") { category = 'home'; pagetype = 'homepage'; } If pathname is like that the script should show category : home and…
Tori
  • 41
  • 1
  • 2
  • 7
-1
votes
1 answer

ftok pathname vs. filename

key_t ftok(const char *pathname, int proj_id); What if I use a filename for the first parameter instead of pathname? For example, my program is in the following directory /afs/edu/id/group/a/ftok_test.c In this case, if I use int key =…
-1
votes
1 answer

Get URL location pathname

Let's say I have a dummy website URL: http://company.com/something. I need to grab the path: /something and use a switch case to redirect to a new URL using javascript. Can someone please guide me? var URL; var url_param =…
rolu
  • 378
  • 2
  • 3
  • 19
-1
votes
1 answer

Path name that will work on all OSs

I have created a program to download a file and put it in a specific location but I cant get it to work on all systems. What could i change this to to make it work on all operating systems. /Users/anthonybuttillo/Library/Application…
-2
votes
2 answers

Is '/' necessary in the starting of a pathname?

What is the difference between these two pathnames? Is / necessary to put in start for going in a folder? assets/myImg.png /assets/myImg.png
Bikram Kumar
  • 393
  • 1
  • 4
  • 15
-3
votes
2 answers

what return 'windows.location.pathname'?

I tested something with the function window.locatin.pathname. This is my js script: var location = window.location.pathname; console.log(location); // -> /de/immobilien-auf-mallorca/ if(location == "/de/immobilien-auf-mallorca"){ …
cgee
  • 1,910
  • 2
  • 22
  • 38
1 2 3
12
13