Skip to content

Commit

Permalink
Rename to have filename match the cmdlet name and some minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers committed Sep 26, 2023
1 parent b2b9aa0 commit b8a5c76
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
namespace PnP.PowerShell.Commands.Files
{
[Cmdlet(VerbsData.Convert, "PnPFileToPdf")]
public class ConvertFile : PnPWebCmdlet
public class ConvertFileToPdf : PnPWebCmdlet
{
private const string URLTOPATH = "Save to local path";
private const string URLASMEMORYSTREAM = "Return as memorystream";
Expand All @@ -22,7 +22,6 @@ public class ConvertFile : PnPWebCmdlet
public string Url;

[Parameter(Mandatory = true, ParameterSetName = URLTOPATH)]
[Alias("Local path")]
public string Path = string.Empty;

[Parameter(Mandatory = false, ParameterSetName = URLTOPATH)]
Expand Down Expand Up @@ -56,8 +55,6 @@ public class ConvertFile : PnPWebCmdlet
[Parameter(Mandatory = false, ParameterSetName = URLASMEMORYSTREAM)]
public SwitchParameter AsMemoryStream;



protected override void ExecuteCmdlet()
{
if (string.IsNullOrEmpty(Path))
Expand Down Expand Up @@ -158,7 +155,6 @@ private Microsoft.SharePoint.Client.File GetFileByServerRelativePath(string serv
}
}


private Folder EnsureFolder()
{
// First try to get the folder if it exists already. This avoids an Access Denied exception if the current user doesn't have Full Control access at Web level
Expand Down

0 comments on commit b8a5c76

Please sign in to comment.