コード例 #1
0
        private static void DoPutUniqueFile(FtpsClient client)
        {
            var localPathName = _commandArguments[0];

            if (_commandArguments.Count > 1)
            {
                var remoteDirName = NormalizeRemotePath(_commandArguments[1]);
                client.SetCurrentDirectory(remoteDirName);
            }

            string remoteFileName;

            client.PutUniqueFile(localPathName, out remoteFileName, TransferCallback);

            Console.WriteLine("Unique file uploaded. File name: \"" + remoteFileName + "\"");
        }