Ejemplo n.º 1
0
        internal static StorageFolder GetFolderForPathOrURI(string path)
        {
            if (System.Uri.IsWellFormedUriString(path, UriKind.RelativeOrAbsolute))
            {
                return(NETFXCOREIOService.GetFolderForURI(path));
            }
            IAsyncOperation <StorageFolder> folderFromPathAsync = StorageFolder.GetFolderFromPathAsync(Path.GetDirectoryName(path));

            WindowsRuntimeSystemExtensions.AsTask <StorageFolder>(folderFromPathAsync).Wait();
            return(folderFromPathAsync.GetResults());
        }