예제 #1
0
 /// <summary>
 /// Constructor for the top FTP server directory. Use this one.
 /// </summary>
 /// <param name="connection"></param>
 public FolderNode(FTPConnection connection)
 {
     this.Modified                = default;
     this.Name                    = "httpdocs";
     this.IsDirectory             = true;
     this.RelativeParentDirectory = "/";
     SubdirectoyMap               = new FileSystemMap("/", FileSystemMap.FileBuildType.FTP, connection);
 }
예제 #2
0
 public FolderNode(string localDirectory)
 {
     this.Modified                = Directory.GetLastWriteTime(localDirectory);
     this.Name                    = Path.GetFileName(localDirectory);
     this.IsDirectory             = true;
     this.RelativeParentDirectory = Path.GetDirectoryName(localDirectory);
     this.Size                    = 0;
     SubdirectoyMap               = new FileSystemMap(Path.Combine(RelativeParentDirectory, Name), FileSystemMap.FileBuildType.Local, null);
 }
예제 #3
0
 public FolderNode(DateTime modified, string name, bool isDirectory, string parentDirectory)
 {
     this.Modified                = modified;
     this.Name                    = name;
     this.IsDirectory             = true;
     this.RelativeParentDirectory = parentDirectory;
     this.Size                    = 0;
     SubdirectoyMap               = new FileSystemMap(Path.Combine(parentDirectory, Name), FileSystemMap.FileBuildType.Local);
 }
예제 #4
0
 public FolderNode(string lineFTPListDetail, string ftpListDirectory, FTPDetailParser parser, FTPConnection connection)
 {
     this.Modified                = parser.ParseModifiedDate(lineFTPListDetail);
     this.Name                    = parser.ParseFileName(lineFTPListDetail);
     this.IsDirectory             = true;
     this.RelativeParentDirectory = ftpListDirectory;
     this.Size                    = 0;
     SubdirectoyMap               = new FileSystemMap(Path.Combine(ftpListDirectory, Name), FileSystemMap.FileBuildType.FTP, connection);
 }
예제 #5
0
 public FolderNode(FileSystemNode node, FileSystemMap.FileBuildType buildType, FTPConnection connection = null)
 {
     this.Name                    = node.Name;
     this.Modified                = node.Modified;
     this.IsDirectory             = true;
     this.RelativeParentDirectory = node.RelativeParentDirectory;
     this.Size                    = node.Size;
     SubdirectoyMap               = new FileSystemMap(Path.Combine(node.RelativeParentDirectory, Name), buildType, connection);
 }