/// <exception cref="System.IO.IOException"></exception> public virtual void ReadFrom(File file) { if (!file.Exists()) { throw new IOException(Messages.Get(41, file.GetAbsolutePath ())); } i_length = (int)file.Length(); CheckExt(file); if (i_stream.IsClient) { i_file = file; ((IBlobTransport)i_stream).ReadBlobFrom(i_trans, this); } else { ReadLocal(file); } }
/// <exception cref="System.IO.IOException"></exception> public virtual void ReadFrom(File file) { if (!file.Exists()) { throw new IOException(Messages.Get(41, file.GetAbsolutePath ())); } i_length = (int) file.Length(); CheckExt(file); if (i_stream.IsClient) { i_file = file; ((IBlobTransport) i_stream).ReadBlobFrom(i_trans, this); } else { ReadLocal(file); } }
public virtual void ProcessAtServer() { try { BlobImpl blobImpl = this.ServerGetBlobImpl(); if (blobImpl != null) { blobImpl.SetTrans(Transaction()); Sharpen.IO.File file = blobImpl.ServerFile(null, false); int length = (int)file.Length(); Socket4Adapter sock = ServerMessageDispatcher().Socket(); Msg.Length.GetWriterForInt(Transaction(), length).Write(sock); FileInputStream fin = new FileInputStream(file); Copy(fin, sock, false); sock.Flush(); Msg.Ok.Write(sock); } } catch (Exception) { Write(Msg.Error); } }
/// <summary>returns true if the specified file system path already exists.</summary> /// <remarks>returns true if the specified file system path already exists.</remarks> public virtual bool Exists(string uri) { Sharpen.IO.File file = new Sharpen.IO.File(uri); return(file.Exists() && file.Length() > 0); }
public override bool Exists(string path) { Sharpen.IO.File existingFile = new Sharpen.IO.File(path); return existingFile.Exists() && existingFile.Length() > 0; }
public override bool Exists(string path) { Sharpen.IO.File existingFile = new Sharpen.IO.File(path); return(existingFile.Exists() && existingFile.Length() > 0); }
/// <summary>returns true if the specified file system path already exists.</summary> /// <remarks>returns true if the specified file system path already exists.</remarks> public virtual bool Exists(string uri) { Sharpen.IO.File file = new Sharpen.IO.File(uri); return file.Exists() && file.Length() > 0; }
public override bool Exists(string path) { var existingFile = new File(path); return(existingFile.Exists() && existingFile.Length() > 0); }
public override bool Exists(string path) { var existingFile = new File(path); return existingFile.Exists() && existingFile.Length() > 0; }
/// <summary>returns true if the specified file system path already exists.</summary> /// <remarks>returns true if the specified file system path already exists.</remarks> public virtual bool Exists(string uri) { var file = new File(uri); return(file.Exists() && file.Length() > 0); }
/// <summary>returns true if the specified file system path already exists.</summary> /// <remarks>returns true if the specified file system path already exists.</remarks> public virtual bool Exists(string uri) { var file = new File(uri); return file.Exists() && file.Length() > 0; }