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?
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?
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?
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?
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
84017
84017
add a comment |
add a comment |
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