The Labs \ Source Viewer \ SSCLI \ System.Net \ WebRequestMethods

  1. //------------------------------------------------------------------------------
  2. // <copyright file="WebRequestMethods.cs" company="Microsoft">
  3. //
  4. // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
  5. //
  6. // The use and distribution terms for this software are contained in the file
  7. // named license.txt, which can be found in the root of this distribution.
  8. // By using this software in any fashion, you are agreeing to be bound by the
  9. // terms of this license.
  10. //
  11. // You must not remove this notice, or any other, from this software.
  12. //
  13. // </copyright>
  14. //------------------------------------------------------------------------------
  15. namespace System.Net
  16. {
  17.     public static class WebRequestMethods
  18.     {
  19.        
  20.         public static class Ftp
  21.         {
  22.             public const string DownloadFile = "RETR";
  23.             // downloads a file
  24.             public const string ListDirectory = "NLST";
  25.             // generates a list of files in directory
  26.             public const string UploadFile = "STOR";
  27.             // uploads a file
  28.             public const string DeleteFile = "DELE";
  29.             // deletes a file
  30.             public const string AppendFile = "APPE";
  31.             // append a file
  32.             public const string GetFileSize = "SIZE";
  33.             // determines if a file is in existance
  34.             public const string UploadFileWithUniqueName = "STOU";
  35.             public const string MakeDirectory = "MKD";
  36.             public const string RemoveDirectory = "RMD";
  37.             public const string ListDirectoryDetails = "LIST";
  38.             public const string GetDateTimestamp = "MDTM";
  39.             public const string PrintWorkingDirectory = "PWD";
  40.             public const string Rename = "RENAME";
  41.         }
  42.        
  43.         public static class Http
  44.         {
  45.             public const string Get = "GET";
  46.             public const string Connect = "CONNECT";
  47.             public const string Head = "HEAD";
  48.             public const string Put = "PUT";
  49.             public const string Post = "POST";
  50.             public const string MkCol = "MKCOL";
  51.         }
  52.        
  53.         public static class File
  54.         {
  55.             public const string DownloadFile = "GET";
  56.             public const string UploadFile = "PUT";
  57.         }
  58.     }
  59. }

Developer Fusion