Qt 4.8
Functions
qfilesystemengine_unix.cpp File Reference
#include "qplatformdefs.h"
#include "qfilesystemengine_p.h"
#include "qfsfileengine.h"
#include "qfile.h"
#include <QtCore/qvarlengtharray.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
#include <QtCore/private/qcore_mac_p.h>

Go to the source code of this file.

Functions

static bool _q_isMacHidden (const char *nativePath)
 

Function Documentation

◆ _q_isMacHidden()

static bool _q_isMacHidden ( const char *  nativePath)
inlinestatic

Definition at line 63 of file qfilesystemengine_unix.cpp.

Referenced by QFileSystemEngine::fillMetaData().

64 {
65  OSErr err;
66 
67  FSRef fsRef;
68  err = FSPathMakeRefWithOptions(reinterpret_cast<const UInt8 *>(nativePath),
69  kFSPathMakeRefDoNotFollowLeafSymlink, &fsRef, 0);
70  if (err != noErr)
71  return false;
72 
73  FSCatalogInfo catInfo;
74  err = FSGetCatalogInfo(&fsRef, kFSCatInfoFinderInfo, &catInfo, NULL, NULL, NULL);
75  if (err != noErr)
76  return false;
77 
78  FileInfo * const fileInfo = reinterpret_cast<FileInfo*>(&catInfo.finderInfo);
79  return (fileInfo->finderFlags & kIsInvisible);
80 }