powershell - Getting Date from a file on a remote FTP Server -


एक फ़ाइल प्राप्त करने के लिए, विधि इस तरह दिखती है:

  $ ftprequest.Method = [System.Net.WebRequestMethods + Ftp] :: DownloadFile   

तो, मैं नीचे सी # कोड के बराबर होने के लिए विधि को बदलने की कोशिश कर रहा हूं:

  अनुरोध। विधि = System.Net.WebRequestMethods.Ftp.GetDateTimestamp;   

मैं powershell में GetDateTimestamp उपयोग कर सकते हैं कैसे

मैं अभी तक किसी भी भाग्य के बिना निम्नलिखित रूपों की कोशिश की है:

  $ ftprequest। विधि = [System.Net.WebRequestMethods + Ftp.GetDateTimestamp] $ ftprequest.Method = [System.Net.WebRequestMethods + एफ़टीपी + GetDateTimestamp] $ ftprequest.Method = [System.Net.WebRequestMethods.Ftp.GetDateTimestamp] $ ftprequest.Method = [System.Net.WebRequestMethods.Ftp + GetDateTimestamp]   

बोनस प्रश्न: क्या है: पहला कोड उदाहरण मतलब क्या है?

धन्यवाद!

यह काम करने लगता है:

  $ ftprequest.method = [System.Net .WebRequestMethods + एफ़टीपी] :: GetDateTimestamp   

<कोड> :: साझा पहुंच के लिए है / स्थिर सदस्यों, जो GetDateTimeStamp है।

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -