search for: get_file_type

Displaying 5 results from an estimated 5 matches for "get_file_type".

2018 Dec 03
3
[supermin PATCH] build: ignore empty files
...e appliance lines = function String.sub path 1 (n-1) ) lines in { appliance with excludefiles = appliance.excludefiles @ lines } - | Base_image -> assert false + | Base_image | Empty -> assert false (* Determine the [file_type] of [file], or exit with an error. *) and get_file_type file = @@ -331,6 +335,7 @@ and get_file_content file buf len = else if len >= 2 && buf.[0] = '/' then Hostfiles else if len >= 2 && buf.[0] = '-' then Excludefiles else if len >= 1 && isalnum buf.[0] then Packages + else if len = 0 then Emp...
2007 Oct 01
2
[ win32utils-Bugs-14360 ] Bad interaction between win32-file-stat and FileUtils
...;'foo'') unless File.exists?(''foo'') FileUtils.touch(''temp.txt'') FileUtils.mv(''temp.txt'', ''foo'') # END CODE C:\>ruby stat-mv.rb C:/ruby/lib/ruby/gems/1.8/gems/win32-file-stat-1.2.6/lib/win32/file/stat.rb:575:in `get_file_type'': The system cannot fi nd the file specified. (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-file-stat-1.2.6/lib/win32/file/stat.rb:53:in `initialize'' from C:/ruby/lib/ruby/gems/1.8/gems/win32-file-0.5.4/lib/win32/file.rb:532:in `new'' fr...
2018 Dec 03
0
Re: [supermin PATCH] build: ignore empty files
...String.sub path 1 (n-1) > ) lines in > { appliance with excludefiles = appliance.excludefiles @ lines } > - | Base_image -> assert false > + | Base_image | Empty -> assert false > > (* Determine the [file_type] of [file], or exit with an error. *) > and get_file_type file = > @@ -331,6 +335,7 @@ and get_file_content file buf len = > else if len >= 2 && buf.[0] = '/' then Hostfiles > else if len >= 2 && buf.[0] = '-' then Excludefiles > else if len >= 1 && isalnum buf.[0] then Packages > +...
2018 Dec 03
4
[supermin PATCH v2 0/3] Better handle no config files
This is a "merge" of two previous series: https://www.redhat.com/archives/libguestfs/2018-December/msg00015.html https://www.redhat.com/archives/libguestfs/2018-December/msg00020.html The goal is to handle better situations like: - empty file in the appliance directory - no config files available in the packages to include in an appliance Compared to the two series, the changes are: -
2014 Feb 25
2
[PATCH supermin v4] Supermin 5 rewrite.
...| dir :: rest when Sys.is_directory dir -> + let inputs = Array.to_list (Sys.readdir dir) in + let inputs = List.sort compare inputs in + let inputs = List.map ((//) dir) inputs in + read_appliance debug basedir appliance (inputs @ rest) + + | file :: rest -> + let file_type = get_file_type file in + + if debug >= 1 then + printf "supermin: build: visiting %s type %s\n%!" + file (string_of_file_type file_type); + + (* Depending on the file type, read or unpack the file. *) + let appliance = + match file_type with + | Uncompressed ((Packages|...