/// <summary> /// Moves the file to a new directory /// </summary> /// <param name="Directory">Directory to move to</param> public void MoveTo(IDirectory Directory) { if (InternalFile == null || Directory == null) { return; } InternalFile.MoveTo(Directory); }
/// <summary> /// Renames the file /// </summary> /// <param name="NewName">New name for the file</param> public override void Rename(string NewName) { if (string.IsNullOrEmpty(NewName) || !Exists) { return; } InternalFile.MoveTo(InternalFile.DirectoryName + "\\" + NewName); InternalFile = new System.IO.FileInfo(InternalFile.DirectoryName + "\\" + NewName); }
/// <summary> /// Moves the file to a new directory /// </summary> /// <param name="directory">Directory to move to</param> public IFile MoveTo(IDirectory directory) { if (InternalFile is null || directory is null) { return(this); } InternalFile.MoveTo(directory); return(this); }
/// <summary> /// Moves the file to a new directory /// </summary> /// <param name="Directory">Directory to move to</param> public override void MoveTo(IDirectory Directory) { if (Directory == null || !Exists) { return; } Directory.Create(); InternalFile.MoveTo(Directory.FullName + "\\" + Name); InternalFile = new System.IO.FileInfo(Directory.FullName + "\\" + Name); }
/// <summary> /// Renames the file /// </summary> /// <param name="newName">New name for the file</param> public override IFile Rename(string newName) { if (string.IsNullOrEmpty(newName) || !Exists) { return(this); } InternalFile.MoveTo(InternalFile.DirectoryName + "\\" + newName); InternalFile = new System.IO.FileInfo(InternalFile.DirectoryName + "\\" + newName); return(this); }
/// <summary> /// Moves the file to a new directory /// </summary> /// <param name="directory">Directory to move to</param> public override IFile MoveTo(IDirectory directory) { if (directory is null || !Exists || string.IsNullOrEmpty(directory.FullName)) { return(this); } directory.Create(); InternalFile.MoveTo(directory.FullName + "\\" + Name); InternalFile = new System.IO.FileInfo(directory.FullName + "\\" + Name); return(this); }
public void MoveTo(IDirectory Directory) { InternalFile.MoveTo(Directory.FullName + "\\" + Name); InternalFile = new FileInfo(Directory.FullName + "\\" + Name); }
public void Rename(string NewName) { InternalFile.MoveTo(InternalFile.DirectoryName + "\\" + NewName); InternalFile = new FileInfo(InternalFile.DirectoryName + "\\" + NewName); }