Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
ce992863
Commit
ce992863
authored
Jan 14, 2017
by
Rémi Verschelde
Committed by
GitHub
Jan 14, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7524 from neikeq/pr-dir-getcurdrive
Directory: Bind get_current_drive() method
parents
479790a8
0b2ae731
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
core_bind.cpp
core/bind/core_bind.cpp
+6
-1
core_bind.h
core/bind/core_bind.h
+1
-0
No files found.
core/bind/core_bind.cpp
View file @
ce992863
...
...
@@ -431,7 +431,7 @@ String _OS::get_latin_keyboard_variant() const {
String
_OS
::
get_model_name
()
const
{
return
OS
::
get_singleton
()
->
get_model_name
();
return
OS
::
get_singleton
()
->
get_model_name
();
}
...
...
@@ -1864,6 +1864,10 @@ String _Directory::get_drive(int p_drive){
ERR_FAIL_COND_V
(
!
d
,
""
);
return
d
->
get_drive
(
p_drive
);
}
int
_Directory
::
get_current_drive
()
{
ERR_FAIL_COND_V
(
!
d
,
""
);
return
d
->
get_current_drive
();
}
Error
_Directory
::
change_dir
(
String
p_dir
){
...
...
@@ -1972,6 +1976,7 @@ void _Directory::_bind_methods() {
ClassDB
::
bind_method
(
_MD
(
"list_dir_end"
),
&
_Directory
::
list_dir_end
);
ClassDB
::
bind_method
(
_MD
(
"get_drive_count"
),
&
_Directory
::
get_drive_count
);
ClassDB
::
bind_method
(
_MD
(
"get_drive"
,
"idx"
),
&
_Directory
::
get_drive
);
ClassDB
::
bind_method
(
_MD
(
"get_current_drive"
),
&
_Directory
::
get_current_drive
);
ClassDB
::
bind_method
(
_MD
(
"change_dir:Error"
,
"todir"
),
&
_Directory
::
change_dir
);
ClassDB
::
bind_method
(
_MD
(
"get_current_dir"
),
&
_Directory
::
get_current_dir
);
ClassDB
::
bind_method
(
_MD
(
"make_dir:Error"
,
"path"
),
&
_Directory
::
make_dir
);
...
...
core/bind/core_bind.h
View file @
ce992863
...
...
@@ -464,6 +464,7 @@ public:
int
get_drive_count
();
String
get_drive
(
int
p_drive
);
int
get_current_drive
();
Error
change_dir
(
String
p_dir
);
///< can be relative or absolute, return false on success
String
get_current_dir
();
///< return current dir location
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment