fork download
  1. I want to have a user setting that is passed in as a string the string reprsents
  2. a list of folders along with some 'meta' data. The folders passed in will be
  3. used cross platform, but I will convert seperators / and \ for the platfrom I am
  4. running on.The list of folders will be used to search for all sub folders in
  5. them
  6.  
  7. Indavidual folders will be space deliminated, eg
  8. foo bar foobar/foo foobar/bar
  9.  
  10. the '^' befor a foldername will be used to seperate any meta data for the
  11. next one folder, though it should not be space deliminated. If it where, the
  12. meta tag would apply to no folder, and the folder you intended to apply it to
  13. will have no meta data at all.
  14.  
  15. if your folder name needs to littrally start with '^', with any other meta data
  16. such as '!nix~^myOddFolder' you can start with the '~' character, this will
  17. mean that anything between the initial '~' and the first '^' will taken as
  18. of folder name
  19. ~!nix~^win_^myOddFolder => !nix~^win_myOddFolder
  20.  
  21. Note that you do not need to worry about escpaing meta data if you never use the
  22. '^' symbol, or if this parts that look like meta data come after the first '^'.
  23. eg
  24. ^does_not_need_escaping
  25. however, in this example, the initial '^' will not be counted as part of the
  26. folder name. As the anything upto and including the first '^' is removed as meta
  27. data, if you want to start your folder name with a '^' you can simple write '^^'
  28. there is no need use '~^^'
  29.  
  30. It is also worth noteing that you can combine meta data with escaping, but you
  31. should not need to. eg
  32.  
  33. you might be | but can just | to match
  34. tempted to write | write | the folder
  35. | |
  36. !win~nix^/foobar | !win^nix/foobar | nix/foobar
  37.  
  38. A '!' will indicate an exlusion, the folder and all sub folders will not be
  39. searched, eg
  40. foobar !^foobar/foo foobar/bar
  41. This will search foobar, and foorbar/bar (it did not need to be expliciatley
  42. stated) but it will not search foobar/foo.
  43.  
  44. A tag can be applied to only certain platforms by using a 'code', either 'win',
  45. 'nix' or 'osx'
  46. 'win' => Windows
  47. 'nix' => Linux and Unix like OS
  48. 'osx' => macs/osx
  49. Only one platform tag can be used, and the last one used will be the one that is
  50. taken. These can also be combined with '!' (so if you want a folder on two
  51. platforms, simply exclude it from the third), eg
  52. !win^foobar/not_windows winosx^only_used_on_osx !winosx^not_osx
  53.  
  54. In order to do 32/64 bit only folders, you can also use two tags
  55. 'x86' => 32 bit platforms
  56. 'x64' => 64 bit platforms
  57. like OS specific tags, these only one can be ineffect, and the last one used
  58. takes preccedence. They can be combined along with the OS tags. eg
  59. x64^all_OSs/only_64_bit !x86win^not_32_bit_nor_Windows
  60.  
  61. As you can see in this last exxample, the negation works applies to all the tags
  62. . The 'x86win' part says 'if on 32 bit Windows...' and the '!' says do not
  63. search in this folder. If you wanted Windows AND not 32 but, you should say
  64. 'x64win'
  65.  
  66. As a final point, it is important to consider how the pattern will be
  67. interpreted. When it is passed, it will be reduced to two lists, one for folders
  68. to search and one for folders to exlucde from searching. As the string is
  69. passed, any details that relate to other platforms are droped, leaving only the
  70. folders that are intended for this platform.
  71.  
  72. For example, if you have the folder string 'foo/bar !win^foo win^bar', on
  73. platforms other then Windows, this will search through no folders, as the
  74. '!win^foo' will exclude the 'foo/bar' that you might think would be searched by
  75. all platforms.
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty