Browse Source

Implemented File::isOnRemovableDrive() for mac

tags/2021-05-28
jules 17 years ago
parent
commit
058d5b9574
2 changed files with 24 additions and 4 deletions
  1. +12
    -2
      build/macosx/platform_specific_code/juce_mac_Files.mm
  2. +12
    -2
      juce_amalgamated.cpp

+ 12
- 2
build/macosx/platform_specific_code/juce_mac_Files.mm View File

@@ -204,8 +204,18 @@ bool File::isOnHardDisk() const throw()
bool File::isOnRemovableDrive() const throw() bool File::isOnRemovableDrive() const throw()
{ {
jassertfalse // xxx not implemented for mac!
return false;
const ScopedAutoReleasePool pool;
BOOL removable = false;
[[NSWorkspace sharedWorkspace]
getFileSystemInfoForPath: juceStringToNS (getFullPathName())
isRemovable: &removable
isWritable: nil
isUnmountable: nil
description: nil
type: nil];
return removable;
} }
static bool juce_isHiddenFile (const String& path) throw() static bool juce_isHiddenFile (const String& path) throw()


+ 12
- 2
juce_amalgamated.cpp View File

@@ -264539,8 +264539,18 @@ bool File::isOnHardDisk() const throw()


bool File::isOnRemovableDrive() const throw() bool File::isOnRemovableDrive() const throw()
{ {
jassertfalse // xxx not implemented for mac!
return false;
const ScopedAutoReleasePool pool;
BOOL removable = false;

[[NSWorkspace sharedWorkspace]
getFileSystemInfoForPath: juceStringToNS (getFullPathName())
isRemovable: &removable
isWritable: nil
isUnmountable: nil
description: nil
type: nil];

return removable;
} }


static bool juce_isHiddenFile (const String& path) throw() static bool juce_isHiddenFile (const String& path) throw()


Loading…
Cancel
Save