comparison dwt/internal/cocoa/NSDirectoryEnumerator.d @ 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents f565d3a95c0a
children
comparison
equal deleted inserted replaced
44:ca5e494f2bbf 45:d8635bb48c7c
1 /******************************************************************************* 1 /*******************************************************************************
2 * Copyright (c) 2007 IBM Corporation and others. 2 * Copyright (c) 2000, 2008 IBM Corporation and others.
3 * All rights reserved. This program and the accompanying materials 3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0 4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at 5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html 6 * http://www.eclipse.org/legal/epl-v10.html
7 * 7 *
8 * Contributors: 8 * Contributors:
9 * IBM Corporation - initial API and implementation 9 * IBM Corporation - initial API and implementation
10 * 10 *
11 * Port to the D programming language: 11 * Port to the D programming language:
12 * Jacob Carlborg <jacob.carlborg@gmail.com> 12 * Jacob Carlborg <doob@me.com>
13 *******************************************************************************/ 13 *******************************************************************************/
14 module dwt.internal.cocoa.NSDirectoryEnumerator; 14 module dwt.internal.cocoa.NSDirectoryEnumerator;
15 15
16 import dwt.internal.cocoa.NSDictionary; 16 import dwt.dwthelper.utils;
17 import cocoa = dwt.internal.cocoa.id;
17 import dwt.internal.cocoa.NSEnumerator; 18 import dwt.internal.cocoa.NSEnumerator;
18 import dwt.internal.cocoa.OS; 19 import dwt.internal.cocoa.OS;
19 import objc = dwt.internal.objc.runtime; 20 import objc = dwt.internal.objc.runtime;
20 21
21 public class NSDirectoryEnumerator : NSEnumerator 22 public class NSDirectoryEnumerator : NSEnumerator {
22 {
23 public this ()
24 {
25 super();
26 }
27 23
28 public this (objc.id id) 24 public this() {
29 { 25 super();
30 super(id); 26 }
31 }
32 27
33 public NSDictionary directoryAttributes () 28 public this(objc.id id) {
34 { 29 super(id);
35 objc.id result = OS.objc_msgSend(this.id_, OS.sel_directoryAttributes); 30 }
36 return result !is null ? new NSDictionary(result) : null;
37 }
38 31
39 public NSDictionary fileAttributes () 32 public this(cocoa.id id) {
40 { 33 super(id);
41 objc.id result = OS.objc_msgSend(this.id_, OS.sel_fileAttributes); 34 }
42 return result !is null ? new NSDictionary(result) : null;
43 }
44 35
45 public void skipDescendents () 36 public void skipDescendents() {
46 { 37 OS.objc_msgSend(this.id, OS.sel_skipDescendents);
47 OS.objc_msgSend(this.id_, OS.sel_skipDescendents);
48 }
49 } 38 }
39
40 }