Re: [directory-upload] easier way to determine if something is a directory? (#24)

Depending on where you got the object from `instanceof Directory` may not help you since Directory probably isn't a global object if this spec isn't implemented (i.e. you'll end up with a ReferenceError exception or something). For this example it would be fine though since we've already checked `'getFilesAndDirectories' in e.dataTransfer` before entering this code, so it should be safe to assume Directory is a global.

Besides that it seems like `if (typeof filesAndDirs[i].getFilesAndDirectories === 'function')` is unnecessarily verbose anyway. Is there any reason this couldn't be `if (filesAndDirs[i].getFilesAndDirectories)`?

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/directory-upload/issues/24#issuecomment-200114946

Received on Wednesday, 23 March 2016 01:31:16 UTC