public string[] Directory(string path) { string[] contents; using (XenStoreStringArray xenStoreDirectory = XenStoreFunctions.xs2_directory(this.xenStoreHandle, path)) { contents = xenStoreDirectory.Value; } return contents; }
/// <summary> /// Friendly version of xs2_directory wrapping up results. /// </summary> /// <param name="handle">XenStore handle.</param> /// <param name="path">XenStore path</param> /// <returns>XenStoreStringArray which can read out the string values.</returns> public static XenStoreStringArray xs2_directory(XenStoreHandle handle, string path) { XenStoreStringArray result = null; uint num; XenStoreStringArrayHandle directory = xs2_directory_impl(handle, path, out num); result = new XenStoreStringArray(num, directory); return result; }