Beispiel #1
0
        public IResourceLocator Update(string path)
        {
            var newLocator = new FileBasedResourceLocator(
                _absolute ?
                _currentDir :
                Path.GetDirectoryName(PreFixed(path))
                );

            return(_absolute ? newLocator.AbsolutePaths() : newLocator);
        }
Beispiel #2
0
 public static Formatter FileBasedFormatter(string path, TagLibMode mode, ITagLib lib=null)
 {
     var locator = new FileBasedResourceLocator();
     return new Formatter(locator.GetDataAsString(path)).
                 OverrideLib(lib).
                 AllowTags(true).
                 SetLocatorFactory(new FileLocatorFactory()).
                 SetInitialLocator(locator.Update(path)).
                 SwitchToMode(mode).
                 SetTagValidator(CreateTagValidatorFor(lib)).
                 Parse();
 }
 public IResourceLocator Update(string path)
 {
     var newLocator = new FileBasedResourceLocator(
         _absolute ?
         _currentDir :
         Path.GetDirectoryName(PreFixed(path))
         );
     return _absolute ? newLocator.AbsolutePaths() : newLocator;
 }