Пример #1
0
 /// <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);
 }
Пример #3
0
 /// <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);
 }
Пример #5
0
 /// <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);
 }
Пример #6
0
 /// <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);
 }
Пример #7
0
 public void MoveTo(IDirectory Directory)
 {
     InternalFile.MoveTo(Directory.FullName + "\\" + Name);
     InternalFile = new FileInfo(Directory.FullName + "\\" + Name);
 }
Пример #8
0
 public void Rename(string NewName)
 {
     InternalFile.MoveTo(InternalFile.DirectoryName + "\\" + NewName);
     InternalFile = new FileInfo(InternalFile.DirectoryName + "\\" + NewName);
 }