Exemplo n.º 1
0
 public FolderJoinWorker(string filename, int bufsize)
 {
     foldername = FileUtilities.GetFolderNameFromFilepath(filename);
     fname = FileUtilities.GetFileNameOnlyFromFilepath(filename);
     mdata = FileUtilities.ReadFolderMetaFile(foldername, fname);
     this.bufferSize = bufsize;
 }
Exemplo n.º 2
0
        public static bool CreateFolderMetaFile(FolderMetaData metadata, string fileSavePath, string name)
        {
            bool success = true;
            if (metadata == null) return false;
            try
            {
                using (Stream output = File.Create(fileSavePath + name + ".vipfmeta"))
                {
                    BinaryFormatter formatter = new BinaryFormatter();
                    formatter.Serialize(output, metadata);
                }
            }
            catch (Exception e) { success = false; }

            return success;
        }