public OutStream writeNext(Uri path, DateTime modifyTime) { if (m_zipOut == null) { throw UnsupportedErr.make("Zip not opened for writing").val; } if (path.frag() != null) { throw ArgErr.make("Path must not contain fragment: " + path).val; } if (path.queryStr() != null) { throw ArgErr.make("Path must not contain query: " + path).val; } try { string zipPath = path.ToString(); if (zipPath.StartsWith("/")) { zipPath = zipPath.Substring(1); } ZipEntry entry = new ZipEntry(zipPath); entry.DateTime = new System.DateTime(modifyTime.dotnet()); m_zipOut.PutNextEntry(entry); return(new ZipSysOutStream(m_zipOut)); } catch (System.IO.IOException e) { throw IOErr.make(e).val; } }
public override void modified(DateTime time) { m_file.LastAccessTime = new System.DateTime(time.dotnet()); }
public override DateTime modified() { return(DateTime.dotnet(m_entry.DateTime.Ticks)); }
public override DateTime modified() { return(m_file.Exists ? DateTime.dotnet(m_file.LastAccessTime.Ticks) : null); }
public OutStream writeNext(Uri path, DateTime modifyTime) { if (m_zipOut == null) throw UnsupportedErr.make("Zip not opened for writing").val; if (path.frag() != null) throw ArgErr.make("Path must not contain fragment: " + path).val; if (path.queryStr() != null) throw ArgErr.make("Path must not contain query: " + path).val; try { string zipPath = path.ToString(); if (zipPath.StartsWith("/")) zipPath = zipPath.Substring(1); ZipEntry entry = new ZipEntry(zipPath); entry.DateTime = new System.DateTime(modifyTime.dotnet()); m_zipOut.PutNextEntry(entry); return new ZipSysOutStream(m_zipOut); } catch (System.IO.IOException e) { throw IOErr.make(e).val; } }