public string GetFileFullPath(IODataType dataType, string fileName) { return Path.Combine(GetPath(dataType), fileName); }
public string GetPath(IODataType dataType) { return Path.Combine(FileSystem.RootPath, m_configTable.GetDataTypePath(dataType)); }
public void Delete(IODataType dataType, string filePathFromDataType) { string path = GetFileFullPath(dataType, filePathFromDataType); if (FileSystem.Exists(path)) FileSystem.Delete(path); }
public bool Exists(IODataType dataType, string filePathFromDataType) { string path = GetFileFullPath(dataType, filePathFromDataType); return FileSystem.Exists(path); }
public string ReadString(IODataType dataType, string filePathFromDataType) { byte[] bytes = ReadBytes(dataType, filePathFromDataType); return Encoding.Default.GetString(bytes); }
public Stream Write(IODataType dataType, string filePathFromDataType) { string path = GetFileFullPath(dataType, filePathFromDataType); return FileSystem.Create(path); }
public byte[] ReadBytes(IODataType dataType, string filePathFromDataType) { Stream stream = Read(dataType, filePathFromDataType); byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); stream.Close(); return buffer; }
public Stream Read(IODataType dataType, string filePathFromDataType) { string path = GetFileFullPath(dataType, filePathFromDataType); return FileSystem.Get(path); }
public void SetDataTypePath(IODataType dataType, string dataTypePath) { m_paths[(int)dataType] = dataTypePath;//Path.Combine(m_dataDirectory, path); }
public string GetPath(IODataType type) { return m_paths[(int)type]; }
public string GetDataTypePath(IODataType dataType) { return m_paths[(int)dataType]; }