C
C#10mo ago
altintas12

Can't seem to make a universal filepath

Hi there could anyone explain how I can make a universal filepath so other pc's can locate the files, and make changes to them? Here I will post a picture of my attempts:
No description
59 Replies
Angius
Angius10mo ago
Your second comment seems right Environment.SpecialFolder is what you want to use Or just use relative paths to place the files next to the executable
cap5lut
cap5lut10mo ago
that still wont give ya access from other PCs would it?
altintas12
altintas1210mo ago
But even when using that one somehow the file cant be located on other pc's
Angius
Angius10mo ago
You mean, like, me being able to access your files? Well no, it's got nothing to do with remote access
altintas12
altintas1210mo ago
nono
Angius
Angius10mo ago
Well, I assume the file exists on your PC Does it exist on theirs?
altintas12
altintas1210mo ago
like when you pull the program from github
Angius
Angius10mo ago
Do you, in any way, ensure that it does?
cap5lut
cap5lut10mo ago
there are multiple ways of sharing, some of these are - host an FTP server on the machine - host an HTTP server/some web application on the machine - using SMB to share files/folder (this is the network sharing protocol which windows uses)
altintas12
altintas1210mo ago
when my group pulls the project they get the file, but then they cant change anything in the file because their filepath is different from mine
Angius
Angius10mo ago
You did not notice the "nono"? Well, you will need to ensure the file actually exists in this location For example, you might have a stuff.txt file on your desktop But other people might not So... you will need to ensure they do, somehow
altintas12
altintas1210mo ago
so they need to have it excatly the same place as mine?
Angius
Angius10mo ago
Either use relative paths and package all the necessary files together with your app Or create the file at runtime Or otherwise ensure the file exists
altintas12
altintas1210mo ago
?
Angius
Angius10mo ago
Well, yes If your program expects a stuff.txt file to be on the desktop, and it's not there, what is it to do?
Want results from more Discord servers?
Add your server