public bool addDirectory(CyDirectory direc) { for (int i = 0; i < directories.Length; i++) { if (directories[i] == null) { directories[i] = direc; return(true); } } return(false); }
public CyDirectory[] getDirectories() { int len = 0; for (int i = 0; i < directories.Length; i++) { if (directories[i] != null) { len++; } } CyDirectory[] direcs = new CyDirectory[len]; int ind = 0; for (int i = 0; i < directories.Length; i++) { if (directories[i] != null) { direcs[ind] = directories[i]; ind++; } } return(direcs); }