Пример #1
0
 public string GetFileFullPath(IODataType dataType, string fileName)
 {
     return Path.Combine(GetPath(dataType), fileName);
 }
Пример #2
0
 public string GetPath(IODataType dataType)
 {
     return Path.Combine(FileSystem.RootPath, m_configTable.GetDataTypePath(dataType));
 }
Пример #3
0
 public void Delete(IODataType dataType, string filePathFromDataType)
 {
     string path = GetFileFullPath(dataType, filePathFromDataType);
     if (FileSystem.Exists(path)) FileSystem.Delete(path);
 }
Пример #4
0
 public bool Exists(IODataType dataType, string filePathFromDataType)
 {
     string path = GetFileFullPath(dataType, filePathFromDataType);
     return FileSystem.Exists(path);
 }
Пример #5
0
 public string ReadString(IODataType dataType, string filePathFromDataType)
 {
     byte[] bytes = ReadBytes(dataType, filePathFromDataType);
     return Encoding.Default.GetString(bytes);
 }
Пример #6
0
 public Stream Write(IODataType dataType, string filePathFromDataType)
 {
     string path = GetFileFullPath(dataType, filePathFromDataType);
     return FileSystem.Create(path);
 }
Пример #7
0
        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;
        }
Пример #8
0
 public Stream Read(IODataType dataType, string filePathFromDataType)
 {
     string path = GetFileFullPath(dataType, filePathFromDataType);
     return FileSystem.Get(path);
 }
Пример #9
0
 public void SetDataTypePath(IODataType dataType, string dataTypePath)
 {
     m_paths[(int)dataType] = dataTypePath;//Path.Combine(m_dataDirectory, path);
 }
Пример #10
0
 public string GetPath(IODataType type)
 {
     return m_paths[(int)type];
 }
Пример #11
0
 public string GetDataTypePath(IODataType dataType)
 {
     return m_paths[(int)dataType];
 }