Beispiel #1
0
        private bool isFileInArchiveFolder(String winPath)
        {
            FSConnection fsConn       = (FSConnection)Conn;
            String       winPathStart = fsConn.Config.Drive + "\\" + FSFileHelper.EscapeFileName(fsConn.ArcName);
            String       winPath2     = winPath;

            if (winPath2.Length > winPathStart.Length)
            {
                winPath2 = winPath2.Substring(0, winPathStart.Length);
            }
            return(String.Compare(winPathStart, winPath2, false) == 0);
        }
Beispiel #2
0
        /// <summary>
        /// Makes a file system path in ELOFS for the given Sord object.
        /// </summary>
        /// <param name="sord">Sord object with valid sord.refPaths</param>
        /// <returns>File system path</returns>
        public String GetFileSystemPath(Sord sord, DocVersion dv)
        {
            FSConnection fsConn  = (FSConnection)Conn;
            String       winPath = fsConn.Config.Drive + "\\" + FSFileHelper.EscapeFileName(fsConn.ArcName);

            IdName[] arcPathObjs = sord.refPaths[0].path;
            for (int i = 0; i < arcPathObjs.Length; i++)
            {
                winPath += "\\" + FSFileHelper.EscapeFileName(arcPathObjs[i].name);
            }

            winPath += "\\" + FSFileHelper.EscapeFileName(sord.name);

            if (dv != null)
            {
                winPath += ".";
                winPath += dv.ext;
            }

            return(winPath);
        }