Add wxFileName::SetPermissions().

This is a simple wrapper for the POSIX chmod().

Closes #12951.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-08-07 11:08:28 +00:00
parent 985addd986
commit 5bd6ad08a7
7 changed files with 78 additions and 11 deletions

View File

@@ -11,17 +11,6 @@
#ifndef _WX_FILENAME_H_
#define _WX_FILENAME_H_
/*
TODO:
1. support for drives under Windows
2. more file operations:
a) chmod()
b) [acm]time() - get and set
c) rename()?
3. SameFileAs() function to compare inodes under Unix
*/
#include "wx/arrstr.h"
#include "wx/filefn.h"
#include "wx/datetime.h"
@@ -265,6 +254,10 @@ public:
bool IsFileExecutable() const { return wxIsExecutable(GetFullPath()); }
static bool IsFileExecutable(const wxString &path) { return wxFileExists(path) && wxIsExecutable(path); }
// set the file permissions to a combination of wxPosixPermissions enum
// values
bool SetPermissions(int permissions);
// time functions
#if wxUSE_DATETIME