private string CheckExt(File file) { var name = file.GetName(); var pos = name.LastIndexOf("."); if (pos > 0) { i_ext = Runtime.Substring(name, pos); return(Runtime.Substring(name, 0, pos)); } i_ext = string.Empty; return(name); }
private string CheckExt(Sharpen.IO.File file) { string name = file.GetName(); int pos = name.LastIndexOf("."); if (pos > 0) { i_ext = Sharpen.Runtime.Substring(name, pos); return(Sharpen.Runtime.Substring(name, 0, pos)); } i_ext = string.Empty; return(name); }
/// <exception cref="System.IO.IOException"></exception> public virtual void ReadLocal(File file) { var copied = false; if (fileName == null) { var newFile = new File(ServerPath(), file.GetName()); if (!newFile.Exists()) { Copy(file, newFile); copied = true; fileName = newFile.GetName(); } } if (!copied) { Copy(file, ServerFile(CheckExt(file), true)); } lock (i_stream.Lock()) { i_stream.StoreInternal(i_trans, this, false); } i_status = Status.Completed; }
private string CheckExt(File file) { var name = file.GetName(); var pos = name.LastIndexOf("."); if (pos > 0) { i_ext = Runtime.Substring(name, pos); return Runtime.Substring(name, 0, pos); } i_ext = string.Empty; return name; }