Contents

getFileSystemInfo(forPath:isRemovable:isWritable:isUnmountable:description:type:)

Returns information about the file system at the specified path.

Declaration

func getFileSystemInfo(forPath fullPath: String, isRemovable removableFlag: UnsafeMutablePointer<ObjCBool>?, isWritable writableFlag: UnsafeMutablePointer<ObjCBool>?, isUnmountable unmountableFlag: UnsafeMutablePointer<ObjCBool>?, description: AutoreleasingUnsafeMutablePointer<NSString?>?, type fileSystemType: AutoreleasingUnsafeMutablePointer<NSString?>?) -> Bool

Parameters

  • fullPath:

    The path to the file system mount point.

  • removableFlag:

    On input, a Boolean variable; on return, this variable contains True if the file system is on removable media.

  • writableFlag:

    On input, a Boolean variable; on return, this variable contains True if the file system writable.

  • unmountableFlag:

    On input, a Boolean variable; on return, this variable contains True if the file system is unmountable.

  • description:

    On input, a pointer to a string object variable; on return, if the method was successful, this variable contains a string object that describes the file system. You should not rely on this description for program logic but can use it in message strings. Values can include “hard,” “nfs,” and “foreign.”

  • fileSystemType:

    On input, a pointer to a string object variable; on return, if the method was successful, this variable contains the file system type. Values can include “HFS,” “UFS,” or other values.

Return Value

true if the information was returned; otherwise, false.

Discussion

You can safely call this method from any thread of your app.

See Also

Requesting Information