Skip to content

Add setFilePermissions(filename) and getFilePermissions(filename); #17

Closed
@sea5kg

Description

@sea5kg

Ex.

#include <sys/stat.h>
#include <stdio.h>

if (chmod(sNewFilepath.c_str(), S_IRWXU|S_IRWXG) != 0) {
    std::cout << "ERROR. Could not change permissions for. " << std::endl;
} else {
    struct stat info;
    stat(sNewFilepath.c_str(), &info);
    printf("after chmod(), permissions are: %08x\n", info.st_mode);
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions