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); }
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); }