Exemple #1
0
        public void copy(int sourceFileRegisterId, string semantics, int targetFileRegisterId, string salt)
        {
            Console.WriteLine("#Client: copy from " + sourceFileRegisterId + " to " + targetFileRegisterId + " with salt " + salt);

            ReadFileService readFileService = new ReadFileService(ClientState, semantics, sourceFileRegisterId);
            readFileService.execute();

            byte[] newBytes = appendBytes(readFileService.ReadedFile.Content, salt);

            write(targetFileRegisterId, newBytes);
        }
Exemple #2
0
        public File read(int fileRegisterId, string semantics)
        {
            ReadFileService readFileService = new ReadFileService(ClientState, semantics, fileRegisterId);
            readFileService.execute();

            ClientState.FileContentContainer.addFileContent(readFileService.ReadedFile);
            ClientState.saveMostRecentVersion(readFileService.ReadedFile.FileName, readFileService.ReadedFile.Version);
            return readFileService.ReadedFile;
        }