mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Replace XML codeblock spaces with tabs
This commit is contained in:
parent
5dd76968d8
commit
13f642d959
122 changed files with 2407 additions and 2432 deletions
|
|
@ -19,44 +19,44 @@
|
|||
[codeblocks]
|
||||
[gdscript]
|
||||
func dir_contents(path):
|
||||
var dir = DirAccess.open(path)
|
||||
if dir:
|
||||
dir.list_dir_begin()
|
||||
var file_name = dir.get_next()
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
print("Found directory: " + file_name)
|
||||
else:
|
||||
print("Found file: " + file_name)
|
||||
file_name = dir.get_next()
|
||||
else:
|
||||
print("An error occurred when trying to access the path.")
|
||||
var dir = DirAccess.open(path)
|
||||
if dir:
|
||||
dir.list_dir_begin()
|
||||
var file_name = dir.get_next()
|
||||
while file_name != "":
|
||||
if dir.current_is_dir():
|
||||
print("Found directory: " + file_name)
|
||||
else:
|
||||
print("Found file: " + file_name)
|
||||
file_name = dir.get_next()
|
||||
else:
|
||||
print("An error occurred when trying to access the path.")
|
||||
[/gdscript]
|
||||
[csharp]
|
||||
public void DirContents(string path)
|
||||
{
|
||||
using var dir = DirAccess.Open(path);
|
||||
if (dir != null)
|
||||
{
|
||||
dir.ListDirBegin();
|
||||
string fileName = dir.GetNext();
|
||||
while (fileName != "")
|
||||
{
|
||||
if (dir.CurrentIsDir())
|
||||
{
|
||||
GD.Print($"Found directory: {fileName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.Print($"Found file: {fileName}");
|
||||
}
|
||||
fileName = dir.GetNext();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.Print("An error occurred when trying to access the path.");
|
||||
}
|
||||
using var dir = DirAccess.Open(path);
|
||||
if (dir != null)
|
||||
{
|
||||
dir.ListDirBegin();
|
||||
string fileName = dir.GetNext();
|
||||
while (fileName != "")
|
||||
{
|
||||
if (dir.CurrentIsDir())
|
||||
{
|
||||
GD.Print($"Found directory: {fileName}");
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.Print($"Found file: {fileName}");
|
||||
}
|
||||
fileName = dir.GetNext();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
GD.Print("An error occurred when trying to access the path.");
|
||||
}
|
||||
}
|
||||
[/csharp]
|
||||
[/codeblocks]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue