public static Path categoriesLineFile(Path f) {Path dir = f.toAbsolutePath().getParent();String categoriesName = "categories-"+f.getFileName();return dir.resolve(categoriesName);}
public static FileInfo CategoriesLineFile(FileInfo f){DirectoryInfo dir = f.Directory;string categoriesName = "categories-" + f.Name;return dir == null ? new FileInfo(categoriesName) : new FileInfo(System.IO.Path.Combine(dir.FullName, categoriesName));}