316 :(id)sender shouldShowFilename:(NSString *)filename
320 if ([filename length] == 0)
324 NSFileManager *fm = [NSFileManager defaultManager];
325 NSDictionary *fileAttrs = [fm attributesOfItemAtPath:filename error:nil];
328 NSString *fileType = [fileAttrs fileType];
329 bool isDir = [fileType isEqualToString:NSFileTypeDirectory];
331 if ([
mSavePanel treatsFilePackagesAsDirectories] == NO) {
332 if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
351 || (!(filter &
QDir::Files) && [fileType isEqualToString:NSFileTypeRegular])
352 || ((filter &
QDir::NoSymLinks) && [fileType isEqualToString:NSFileTypeSymbolicLink]))
357 if (filterPermissions) {
358 if ((!(filter &
QDir::Readable) && [fm isReadableFileAtPath:filename])
359 || (!(filter &
QDir::Writable) && [fm isWritableFileAtPath:filename])
::QDir::Filters * mQDirFilter
static bool match(const QStringList &filters, const QString &fileName)
Returns true if the fileName matches any of the wildcard (glob) patterns in the list of filters; othe...
QString fileName() const
Returns the name of the file, excluding the path.
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
The QString class provides a Unicode character string.
bool isEmpty() const
Returns true if the list contains no items; otherwise returns false.
const T & at(int i) const
Returns the item at index position i in the list.
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
int size() const
Returns the number of items in the list.
QStringList * mSelectedNameFilter
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
The QFileInfo class provides system-independent file information.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
The QLatin1Char class provides an 8-bit ASCII/Latin-1 character.