Beispiel #1
0
        public bool GetKeyForFilename(BlobKey outKey, string filename)
        {
            if (!filename.EndsWith(FileExtension))
            {
                return(false);
            }

            //trim off extension
            string rest = filename.Substring(_path.Length + 1, filename.Length - FileExtension.Length - (_path.Length + 1));

            outKey.Bytes = BlobKey.ConvertFromHex(rest);
            return(true);
        }
Beispiel #2
0
        public bool GetKeyForFilename(BlobKey outKey, string filename)
        {
            if (!filename.EndsWith(FileExtension))
            {
                return(false);
            }
            //trim off extension
            string rest = Sharpen.Runtime.Substring(filename, path.Length + 1, filename.Length
                                                    - FileExtension.Length);

            outKey.SetBytes(BlobKey.ConvertFromHex(rest));
            return(true);
        }