# Çapraz Platform Dosya Yolları

Bir işletim sisteminde dosyanın veya dizinin yolunu belirtmek için taksim veya ters-taksim işaretleri kullanırız. Fakat yazağımız program çapraz-platformsa bu durumda ne yapmamız gerekir?

Ya kendimiz bunun için bir fonksiyon oluşturacağız ya da kısa yoldan `os.PathSeperator`'ı kullanabiliriz.

Hemen örneğimizi görelim:

```go
package main

import (
	"fmt"
	"os"
)

func main() {
	s := string(os.PathSeparator)
	yol := "dosyalar" + s + "muzikler"
	fmt.Println(yol)
}
```

{% hint style="info" %}
Her seferinde `string(os.PathSeperator)` yazmamak için `s` değişkenine atayarak kısalttık.
{% endhint %}

Windows için çıktımız:

> dosyalar\muzikler

Unix-Like için çıktımız:

> dosyalar/muzikler


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://go.kaanksc.com/bolum-7-dosya-islemleri/capraz-platform-dosya-yollari.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
