コード例 #1
0
        public object addFromString(ScriptContext context, object localname, object contents)
        {
            string name = PHP.Core.Convert.ObjectToString(localname);

            this.m_zip.BeginUpdate();
            try
            {
                StringDataSource src = new StringDataSource(contents);
                this.m_zip.Add(src, name);
                this.m_zip.CommitUpdate();
                return(true);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("ZipArchive::addFromString", ex.Message);
                return(false);
            }
        }
コード例 #2
0
ファイル: ZipArchive.cs プロジェクト: dw4dev/Phalanger
        public object addFromString(ScriptContext context, object localname, object contents)
        {
            string name = PHP.Core.Convert.ObjectToString(localname);

            this.m_zip.BeginUpdate();
            try
            {
                StringDataSource src = new StringDataSource(contents);
                this.m_zip.Add(src, name);
                this.m_zip.CommitUpdate();
                return true;
            }
            catch (Exception ex)
            {
                Debug.WriteLine("ZipArchive::addFromString", ex.Message);
                return false;
            }
        }