Esempio n. 1
0
        public void DeleteFile(int fileID)
        {
            AuthorizedIdent ident = AuthenticateTicket(Ticket);

            CFile file = new FileSystem(ident, true).GetFile(fileID);

            FileSystemProviderFactory.GetInstance(this);
            m_fs.DeleteFile(file);
        }
Esempio n. 2
0
        public void CommitData(int fileID, byte[] data)
        {
            AuthorizedIdent ident = AuthenticateTicket(Ticket);

            CFile file = new FileSystem(ident, true).GetFile(fileID);

            file.RawData = data;
            FileSystemProviderFactory.GetInstance(this);
            m_fs.CommitData(file);
        }
Esempio n. 3
0
        public DataEnvelope LoadFileData(int fileID)
        {
            AuthorizedIdent ident = AuthenticateTicket(Ticket);

            CFile file = new FileSystem(ident, true).GetFile(fileID);

            FileSystemProviderFactory.GetInstance(this);
            m_fs.FetchData(file);

            return(new DataEnvelope(file.RawData, file.RawData.Length));
        }
Esempio n. 4
0
        public void CopyFile(int destID, int srcID)
        {
            AuthorizedIdent ident = AuthenticateTicket(Ticket);

            FileSystem fs   = new FileSystem(ident, true);
            CFile      src  = fs.GetFile(srcID);
            CFile      dest = fs.GetFile(destID);

            FileSystemProviderFactory.GetInstance(this);
            m_fs.CopyFile(dest, src);
        }
Esempio n. 5
0
        private void Init(AuthorizedIdent ident, bool local)
        {
            DataProviderFactory.GetInstance(this);
            m_ident = ident;
            m_user  = new Users(m_ident).GetInfo(m_ident.Name, null);

            if (local || Globals.FSLocal)
            {
                FileSystemProviderFactory.GetInstance(this);
            }
            else
            {
                FileServiceInit(ident, false);
            }
        }