-static bool changeMode(FileName const & fname, unsigned long int mode)
-{
- if (mode == (unsigned long int)-1)
- return true;
-
- ofstream ofs(fname.toFilesystemEncoding().c_str(), ios::binary | ios::out | ios::trunc);
- if (!ofs)
- return false;
- ofs.close();
- if (!chmod(fname, mode))
- return false;
- return true;
-}
-
-