//FIXME: rewrite this as a Filter public static Gnome.Vfs.Uri UniqueName (Gnome.Vfs.Uri path, string shortname) { int i = 1; Gnome.Vfs.Uri target = path.Clone(); Gnome.Vfs.Uri dest = target.AppendFileName(shortname); while (dest.Exists) { string numbered_name = System.String.Format ("{0}-{1}{2}", System.IO.Path.GetFileNameWithoutExtension (shortname), i++, System.IO.Path.GetExtension (shortname)); dest = target.AppendFileName(numbered_name); } return dest; }