| 312 | } |
| 313 | |
| 314 | int |
| 315 | FileSystemItem::indexInParent() const |
| 316 | { |
| 317 | FileSystemItemPtr parent = _imp->parent.lock(); |
| 318 | |
| 319 | if (parent) { |
| 320 | for (U32 i = 0; i < parent->_imp->children.size(); ++i) { |
| 321 | if (parent->_imp->children[i].get() == this) { |
| 322 | return i; |
| 323 | } |
| 324 | } |
| 325 | } |
| 326 | |
| 327 | return -1; |
| 328 | } |
| 329 | |
| 330 | bool |
| 331 | FileSystemItem::isDir() const |