search for: file_types

Displaying 20 results from an estimated 91 matches for "file_types".

Did you mean: file_type
2006 Jun 22
3
Compare against array
I have a database field called file_type. I want to compare it against an array of types to either display it as an image or just create a link to it. I am sure there is an easy way to do this but I can''t think of it. I don''t want to do this: <% if resource.file_type == ".png" OR resource.file_type == ".jpg" ... %> I would like to do: <% if
2012 Jun 19
0
[LLVMdev] llvm/include/Support/FileSystem.h
This is a proposed patch to enhance FileSystem.h to add functionality (getting and setting permission bits and mapping an unmapping files). This implementation follows the N3365 proposal regarding permission bits. This functionality is needed for my next patch which will implement llvm/include/Support/FileOutputBuffer.h which is needed by lld. -------------- next part -------------- A
2012 May 18
2
[LLVMdev] [RFC] llvm/include/Support/FileOutputBuffer.h
On Fri, May 18, 2012 at 3:07 PM, Michael Spencer <bigcheesegs at gmail.com> wrote: > >> +  error_code ec = sys::fs::status(filePathTwine, stat); > > stat is undefined if ec isn't success. ec will be success even in the case of > file_not_found. Actually I was wrong. The Windows and UNIX implementation disagree on this point. I'm going to change it to match
2006 Mar 03
7
Meta Programming Help
I have the following two methods: def ProductFile::find_images(mode, prod_id) # convert to symbol in case it is not (most commonly it may be a String) mode = mode.to_sym case mode when :all, :first ProductFile::find(mode, :conditions => ["product_id = ? AND file_type LIKE ?", prod_id, "image%"]) end end def ProductFile::find_documents(mode,
2007 Sep 21
3
TextMate Bundle and exception when switching to alternate file.
Hey, sorry if this is something better suited to another list. I''ve encountered a strange problem with the RSpec.tmbundle in trunk - namely that it was raising an exception when pressing ctrl-shift-downarrow (switch between spec and source - "Alternate File"). I tracked down the issue to be handling of the file_type in switch_command.rb#content_for() - the code expected the
2015 Aug 18
3
Supporting symbolic links in Path library routines
include/llvm/Support/FileSystem.h has file_type which enumerates the file system’s view of the file type. One of the values is “symlink_file”. But because the Unix implementation of status() calls stat() instead of lstat(), if the path refers to a symbolic link, the link is followed. There’s no way to get information about the symbolic link itself. I think changing status() to call lstat() is
2019 Jan 30
2
SELinux policy vs. static web content
Hi, Some time ago I wrote an introductory article about SELinux on my blog. I'm currently updating it for my new blog, and I found a curious change in SELinux policy. Here goes. For demonstration purposes, I'm using some static webpages, more exactly the default pages found in /usr/share/httpd/noindex, which I simply copied over to /var/www/html. As a first practical example, I'm
2018 Dec 03
3
[supermin PATCH] build: ignore empty files
Do not error out on empty files, just ignore them. --- src/mode_build.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mode_build.ml b/src/mode_build.ml index b5f5fa6..9cd0a21 100644 --- a/src/mode_build.ml +++ b/src/mode_build.ml @@ -46,6 +46,7 @@ and file_content = | Packages | Hostfiles | Excludefiles +| Empty let rec string_of_file_type = function |
2018 Feb 15
1
[PATCH] daemon: tsk: handle new enum values in sleuthkit 4.5
Resort to a version check for them, as they do not exist in older versions. --- daemon/tsk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/daemon/tsk.c b/daemon/tsk.c index af803d749..ad10d74fe 100644 --- a/daemon/tsk.c +++ b/daemon/tsk.c @@ -241,6 +241,9 @@ file_type (TSK_FS_FILE *fsfile) case TSK_FS_NAME_TYPE_SHAD: return 'h'; case TSK_FS_NAME_TYPE_WHT: return
2006 Mar 02
2
How to get mime extension with file_column
Is there a way to get the MIME extension of a file_column field? Here''s what I want to do (look for comment in before_save method): class ProductFile < ActiveRecord::Base belongs_to :product file_column :file_name def before_save self.file_type = # something that returns the MIME type (e.g. image/jpeg) end end TIA
2016 Jul 04
1
[PATCH] filesystem_walk: more information into tsk_dirent
Access, modification, last status change and creation time in Unix format as for statns. Number of links pointing to a given entry. If the entry is a symbolic link, report the its target path. A new flag (DIRENT_COMPRESSED 0x04) indicating whether the file is compressed using native filesystem compression support. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- daemon/tsk.c
2006 Apr 27
1
Whats this for a block?
Hi, I have got a question concerning directory entries. I have the following block containing exactly the filenames I had in one specified folder on the same file system: http://www.sbox.tugraz.at/home/n/nobaq/ext2.dat I really hoped that this is an directory block which could point me to the inode of the files. But when I try to extract the data, I only get garbage. I'm reading the
2016 Aug 24
0
[PATCH 1/3] New API: internal_find_inode
The internal_find_inode command searches all entries referring to the given inode and returns a tsk_dirent structure for each of them. The command is able to retrieve information regarding deleted or unaccessible files where other commands such as stat or find would fail. The gathered list of tsk_dirent structs is serialised into XDR format and written to a file by the appliance. Signed-off-by:
2011 Oct 18
5
[PATCH febootstrap] Some cleanups for Debian and Ubuntu
I just tried to get libguestfs to compile on Ubuntu 11.10 using the latest febootstrap, and the following patches were necessary for me. They are all just reasonable code cleanups *except* for patch 5/5 which is a gross hack for something I don't understand about how Ubuntu 11.10 multiarch support works. Rich.
2007 Jun 12
1
Selinux custom policy issue - Centos 5
Hi, I've got a Centos 5 box (recently replaced a Centos4 box of the same function). The means of applying custom SELinux policy has changed somewhat from 4->5. I've got it mostly figured out; I have a local.te file with my custom policy and also which defines a few new file types, and a local.fc with appropriate defintions of file contexts. When I run: # checkmodule -M -m -o
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
On Sunday 03 April 2016 16:30:48 Matteo Cafasso wrote: > The internal_filesystem_walk command walks > through the FS structure of a disk partition > and returns all the files or directories > which could be found. > > The command is able to retrieve information > regarding deleted or unaccessible files as well > where other commands such as stat or find > would fail.
2007 Sep 19
1
[PATCH 06/15] ocfs2: Remove open coded readdir()
ocfs2_queue_orphans() has an open coded readdir loop which can easily just use a directory accessor function. Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com> --- fs/ocfs2/dir.c | 28 +++++++++++-- fs/ocfs2/dir.h | 7 +-- fs/ocfs2/journal.c | 118 +++++++++++++++++++-------------------------------- 3 files changed, 70 insertions(+), 83 deletions(-) diff --git
2016 Jul 04
1
Re: [PATCH 1/2] filesystem_walk: more information into tsk_dirent
On Monday 04 July 2016 00:00:59 Matteo Cafasso wrote: > Access, modification, last status change and creation time in > Unix format as for statns. > > Number of links pointing to a given entry. > > If the entry is a symbolic link, report its target path. > > A new flag (DIRENT_COMPRESSED 0x04) indicating whether the file is > compressed using native filesystem
2016 Jul 07
1
[PATCH] filesystem_walk: more information into tsk_dirent
Access, modification, last status change and creation time in Unix format as for statns. Number of links pointing to a given entry. If the entry is a symbolic link, report the its target path. A new flag (DIRENT_COMPRESSED 0x04) indicating whether the file is compressed using native filesystem compression support. Signed-off-by: Matteo Cafasso <noxdafox@gmail.com> --- daemon/tsk.c
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
No material changes are made. --- Makefile | 10 +- convert.c => convert/convert.c | 803 +--------------------------------------- convert/convert.h | 76 ++++ convert/ext2.c | 791 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 873 insertions(+), 807 deletions(-) rename convert.c => convert/convert.c (74%) create mode