Ejemplo n.º 1
0
        /*----< storage folder spec >----------------------------------*/

        /*
         *  - returns FileRef, e.g., tail of path where tail starts after "Storage", i.e. "test/foobar.cs.3"
         *  - returns empty string if "Storage" is not contained in path
         */
        public static FileRef storageFolderRef(FileSpec fileSpec)
        {
            int pos = fileSpec.IndexOf("Storage");

            if (pos == fileSpec.Length || pos == -1)
            {
                return("");
            }
            if (pos + 8 > fileSpec.Length - 1)
            {
                return("");
            }
            string folderSpec = fileSpec.Substring(pos + 8);

            return(folderSpec);
        }