         }
         else {
             self.fileAttributes = getFileAttributes(self.filePath)
-            self.fileExtension = self.filePath.pathExtension
+            self.fileExtension = filePath.pathExtension
             if let fileExtension = fileExtension {
                 self.type = FBFileType(rawValue: fileExtension) ?? .Default
             }

                self.type = .Default
            }
        }
        if let displayName = displayName {
            self.displayName = displayName
        }
        else {
            self.displayName = String()
        }
    }
}


     - returns: FBFile object.
     */
    init(filePath: NSURL) {
        self.filePath = filePath
        let isDirectory = checkDirectory(filePath)
        self.isDirectory = isDirectory
