F
F
FireShip2016-11-27 11:21:04
go
FireShip, 2016-11-27 11:21:04

Is working with files different on Linux and Windows?

Hey! Now from under Linux I am writing a program in which I will work with the file system.
For example, to get access to the "files" folder, which is located in the same place as the server file, "/files/" is passed to the function. On linux everything works great now, but I'm going to compile under windows, will it work there? It's like / == \ on the command line.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikolai Romanovich, 2016-11-27
@FireShip

On Windows, both "\" and "/" can be used as path separators.

V
viai, 2016-12-04
@viai

Windows understands forward and backslashes. BUT. In practice, sometimes there were problems, in particular, when automating MS Word, it worked only with a backslash.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question