Exemple #1
0
        public async Task <IFileItem> WriteTestFile(string extension = "txt", string path = null)
        {
            string filePath;

            if (path != null)
            {
                filePath = path;
            }
            else
            {
                filePath = ImportTestPath;
            }
            string testFileName = string.Format("{0}.{1}", Guid.NewGuid(), extension);
            string testFilePath = filePath + "/" + testFileName;

            var file = RootFolder.GetFileReference(testFilePath, true);
            await file.WriteAsync(new byte[] { 0, 1, 2, 3 });

            return(file);
        }