| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 for (unsigned i = 0; i < files->length(); ++i) { | 62 for (unsigned i = 0; i < files->length(); ++i) { |
| 63 File* file = files->item(i); | 63 File* file = files->item(i); |
| 64 | 64 |
| 65 // FIXME: This involves synchronous file operation. | 65 // FIXME: This involves synchronous file operation. |
| 66 FileMetadata metadata; | 66 FileMetadata metadata; |
| 67 if (!getFileMetadata(file->path(), metadata)) | 67 if (!getFileMetadata(file->path(), metadata)) |
| 68 continue; | 68 continue; |
| 69 | 69 |
| 70 // The dropped entries are mapped as top-level entries in the isolated files
ystem. | 70 // The dropped entries are mapped as top-level entries in the isolated |
| 71 // filesystem. |
| 71 String virtualPath = DOMFilePath::append("/", file->name()); | 72 String virtualPath = DOMFilePath::append("/", file->name()); |
| 72 if (metadata.type == FileMetadata::TypeDirectory) | 73 if (metadata.type == FileMetadata::TypeDirectory) |
| 73 entries.append(DirectoryEntry::create(filesystem, virtualPath)); | 74 entries.append(DirectoryEntry::create(filesystem, virtualPath)); |
| 74 else | 75 else |
| 75 entries.append(FileEntry::create(filesystem, virtualPath)); | 76 entries.append(FileEntry::create(filesystem, virtualPath)); |
| 76 } | 77 } |
| 77 return entries; | 78 return entries; |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace blink | 81 } // namespace blink |
| OLD | NEW |