Numbers in the arguments of the function ioutil.WriteFile
up vote
0
down vote
favorite
Programming with Go, I noticed that the function ioutil.WriteFile (from the ioutil library) needs some numbers as arguments. What do these numbers mean?
Example:
ioutil.WriteFile(file_to_write, byte(string_to_write), 0644) // what 0644 stands for?
go
add a comment |
up vote
0
down vote
favorite
Programming with Go, I noticed that the function ioutil.WriteFile (from the ioutil library) needs some numbers as arguments. What do these numbers mean?
Example:
ioutil.WriteFile(file_to_write, byte(string_to_write), 0644) // what 0644 stands for?
go
5
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
4
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Programming with Go, I noticed that the function ioutil.WriteFile (from the ioutil library) needs some numbers as arguments. What do these numbers mean?
Example:
ioutil.WriteFile(file_to_write, byte(string_to_write), 0644) // what 0644 stands for?
go
Programming with Go, I noticed that the function ioutil.WriteFile (from the ioutil library) needs some numbers as arguments. What do these numbers mean?
Example:
ioutil.WriteFile(file_to_write, byte(string_to_write), 0644) // what 0644 stands for?
go
go
asked Nov 8 at 21:59
konniskatt
2614
2614
5
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
4
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04
add a comment |
5
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
4
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04
5
5
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
4
4
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04
add a comment |
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
These numbers are file permission bits.
To know what these bits means see : permissions (flags) explained
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
These numbers are file permission bits.
To know what these bits means see : permissions (flags) explained
add a comment |
up vote
2
down vote
accepted
These numbers are file permission bits.
To know what these bits means see : permissions (flags) explained
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
These numbers are file permission bits.
To know what these bits means see : permissions (flags) explained
These numbers are file permission bits.
To know what these bits means see : permissions (flags) explained
answered Nov 9 at 4:07
Emruz Hossain
1,021210
1,021210
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53216796%2fnumbers-in-the-arguments-of-the-function-ioutil-writefile%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
golang.org/pkg/io/ioutil/#WriteFile golang.org/pkg/os/#FileMode
– tkausl
Nov 8 at 22:01
4
They are UNIX filesystem permission bits
– maerics
Nov 8 at 22:04