public static IAsyncOperation <BaseStorageFolder> FromPathAsync(string path) { if (FtpHelpers.IsFtpPath(path) && FtpHelpers.VerifyFtpPath(path)) { return(Task.FromResult <BaseStorageFolder>(new FtpStorageFolder(new StorageFolderWithPath(null, path))).AsAsyncOperation()); } return(Task.FromResult <BaseStorageFolder>(null).AsAsyncOperation()); }
public static IAsyncOperation <BaseStorageFile> FromPathAsync(string path) => FtpHelpers.IsFtpPath(path) && FtpHelpers.VerifyFtpPath(path) ? Task.FromResult <BaseStorageFile>(new FtpStorageFile(new StorageFileWithPath(null, path))).AsAsyncOperation() : Task.FromResult <BaseStorageFile>(null).AsAsyncOperation();