public void dir(DirArguments dirArguments)
        {
            var site = GetAuthorisedSite();


            var folderResponseMessage =
               new GetFolderOperation(site, dirArguments.source, AuthorisedSession).ResponseMessage;

            var siteFolderModel = folderResponseMessage.Content<SiteFolderModel>();

            foreach (var folder in siteFolderModel.Folders.ToArray().OrderBy(folder => folder.Name))
            {
                System.Console.WriteLine(folder.Name);
            }

            foreach (var file in siteFolderModel.Files)
            {
                Console.Write(file.Name.PadRight(45));
                Console.Write(file.LastWriteTimeUtc.ToLocalTime().ToShortDateString().PadRight(15));
                Console.Write(file.Length + " bytes");
                Console.WriteLine();
            }



        }
        private void UploadDirectory(StorageEngine storageEngine, Site binderSite, string subDirectoryName, string directorySource, string directoryDestination)
        {

            try
            {


                Console.WriteLine("Uploading directory " + directorySource + "/" + subDirectoryName);

                var directoryDestinationModel =
                    new GetFolderOperation(binderSite, directoryDestination, AuthorisedSession).ResponseMessage
                        .Content<SiteFolderModel>();

                if (directoryDestinationModel.Folders.All(folder => folder.Name.ToLower() != subDirectoryName.ToLower()))
                {
                    Console.WriteLine("Creating folder " + subDirectoryName);
                    var createFolderOperation = new CreateFolderOperation(binderSite, directoryDestination,
                        AuthorisedSession, subDirectoryName);

                    if (!createFolderOperation.ResponseMessage.IsSuccessStatusCode)
                    {
                        throw new ApplicationException("Could not create folder " + subDirectoryName + " - " + createFolderOperation.ResponseMessage.StatusCode);
                    }

                }


                string newSource = Path.Combine(directorySource, subDirectoryName);
                string newDestination = directoryDestination.TrimEnd('/') + "/" + subDirectoryName;


                var files = Directory.GetFiles(newSource, "*.*");
                Console.WriteLine(files.Length + " files");

                UploadFiles(files, binderSite, storageEngine, newDestination);
                foreach (var newDirectory in Directory.GetDirectories(newSource))
                {
                    string newDirectoryName = new DirectoryInfo(newDirectory).Name;
                    UploadDirectory(storageEngine, binderSite, newDirectoryName, newSource, newDestination);
                }

            }
            catch (Exception ex)
            {
                Console.WriteLine("ERROR: Could not upload directory " + subDirectoryName + " - " + ex.Message);
            }


        }