search for: file_typ

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

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 =...
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, prod_id) mode = mode.to_sym case mode when :all, :first ProductFile::find(mode, :conditions => ["product_id = ? AND (file_type LIKE ? or file_type LIKE ?)", prod_id, &qu...
2007 Sep 21
3
TextMate Bundle and exception when switching to alternate file.
...ng 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 type string to be just ''spec'' when it can be ''view spec'' or ''model spec'' etc. Unfortunately I don''t know whether this is just an issue with my local textmate install or if it...
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...
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
...l | 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 | GZip c -> sprintf "gzip %s" (string_of_file_content c) @@ -56,6 +57,7 @@ and string_of_file_content = function | Packages -> "packages" | Hostfiles -> "hostfiles" | Excludefiles -> "excludefiles" + | Empty -> "(e...
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 'w'; case TSK_FS_NAME_TYPE_VIRT: return 'u'; /* Temp files created by TSK */ +#if TSK_VERSION_NUM >= 0x040500ff + case TSK_FS_NAME_TYPE_VIRT_DIR: 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
...RENT_UNALLOC = 0x00, DIRENT_ALLOC = 0x01, - DIRENT_REALLOC = 0x02 + DIRENT_REALLOC = 0x02, + DIRENT_COMPRESSED = 0x04 }; static int open_filesystem (const char *, TSK_IMG_INFO **, TSK_FS_INFO **); static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *); static char file_type (TSK_FS_FILE *); static int file_flags (TSK_FS_FILE *fsfile); +static int file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); static int send_dirent_info (guestfs_int_tsk_dirent *); static void reply_with_tsk_error (const char *); @@ -122,19 +124,24 @@ fswalk_callback (TSK_FS_FILE *fsfile...
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
...sk.c @@ -44,6 +44,7 @@ enum tsk_dirent_flags { static int open_filesystem (const char *, TSK_IMG_INFO **, TSK_FS_INFO **); static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *); +static TSK_WALK_RET_ENUM ifind_callback (TSK_FS_FILE *, const char *, void *); static char file_type (TSK_FS_FILE *); static int file_flags (TSK_FS_FILE *fsfile); static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); @@ -78,6 +79,35 @@ do_internal_filesystem_walk (const mountable_t *mountable) return ret; } +int +do_internal_find_inode (const mountable_t *mountable, int64_t...
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
...t /var/www/possumbase/html/imagetemp(/.*)? system_u:object_r:http_image_temp_t /var/www/sheep/html/imagetemp(/.*)? system_u:object_r:http_image_temp_t And my local.te contains (selected portions only for now): module local 1.1; require { ... <various normal requires> ... } type blast_req_t,file_type; allow httpd_sys_script_t blast_req_t:file { create getattr write}; allow httpd_sys_script_t blast_req_t:dir { read getattr lock search ioctl add_name write }; ...etc So, looks like I need to do something else, possibly in my local.fc. However, my google-fu is not strong enough to find any actual...
2016 Apr 04
2
Re: [PATCH v2 3/5] daemon: Added internal_filesystem_walk command
...+#include "guestfs_protocol.h" > +#include "daemon.h" > +#include "actions.h" > +#include "optgroups.h" > + > +#ifdef HAVE_LIBTSK > + > +#include <tsk/libtsk.h> > + > +/* File types map similar to dirent. */ > +#define TSK_FILE_TYPE_NUM 10 > +char TSK_FILE_TYPE[TSK_FILE_TYPE_NUM] = { > + 'u', 'f', 'c', 'd', 'b', 'r', 'l', 's', 'h', 'w' > +}; I see the libtsk already uses TSK_* and tsk_* prefixes for its own stuff, so I'd avoid using...
2007 Sep 19
1
[PATCH 06/15] ocfs2: Remove open coded readdir()
...) { - status = -EINVAL; - mlog_errno(status); - brelse(bh); - goto out_unlock; - } - - local += le16_to_cpu(de->rec_len); - offset += le16_to_cpu(de->rec_len); - - /* I guess we silently fail on no inode? */ - if (!le64_to_cpu(de->inode)) - continue; - if (de->file_type > OCFS2_FT_MAX) { - mlog(ML_ERROR, - "block %llu contains invalid de: " - "inode = %llu, rec_len = %u, " - "name_len = %u, file_type = %u, " - "name='%.*s'\n", - (unsigned long long)bh->b_blocknr, -...
2016 Jul 04
1
Re: [PATCH 1/2] filesystem_walk: more information into tsk_dirent
...+124,38 @@ fswalk_callback (TSK_FS_FILE *fsfile, const char *path, void *data) > return TSK_WALK_ERROR; > } > > + /* Set dirent fields */ > + memset (&dirent, 0, sizeof dirent); > + > dirent.tsk_inode = fsfile->name->meta_addr; > dirent.tsk_type = file_type (fsfile); > dirent.tsk_size = (fsfile->meta != NULL) ? fsfile->meta->size : -1; > dirent.tsk_name = fname; > dirent.tsk_flags = file_flags (fsfile); > - dirent.tsk_spare1 = dirent.tsk_spare2 = dirent.tsk_spare3 = > - dirent.tsk_spare4 = dirent.tsk_spare5 = dire...
2016 Jul 07
1
[PATCH] filesystem_walk: more information into tsk_dirent
...RENT_UNALLOC = 0x00, DIRENT_ALLOC = 0x01, - DIRENT_REALLOC = 0x02 + DIRENT_REALLOC = 0x02, + DIRENT_COMPRESSED = 0x04 }; static int open_filesystem (const char *, TSK_IMG_INFO **, TSK_FS_INFO **); static TSK_WALK_RET_ENUM fswalk_callback (TSK_FS_FILE *, const char *, void *); static char file_type (TSK_FS_FILE *); static int file_flags (TSK_FS_FILE *fsfile); +static void file_metadata (TSK_FS_META *, guestfs_int_tsk_dirent *); static int send_dirent_info (guestfs_int_tsk_dirent *); static void reply_with_tsk_error (const char *); @@ -122,15 +124,15 @@ fswalk_callback (TSK_FS_FILE *fsfil...
2010 Mar 20
2
[PATCH 4/4] btrfs-convert: split into convert/.
..., - [EXT2_FT_FIFO] = BTRFS_FT_FIFO, - [EXT2_FT_SOCK] = BTRFS_FT_SOCK, - [EXT2_FT_SYMLINK] = BTRFS_FT_SYMLINK, -}; - -static int dir_iterate_proc(ext2_ino_t dir, int entry, - struct ext2_dir_entry *old, - int offset, int blocksize, - char *buf,void *priv_data) -{ - int ret; - int file_type; - u64 objectid; - u64 inode_size; - char dotdot[] = ".."; - struct btrfs_key location; - struct ext2_dir_entry_2 *dirent = (struct ext2_dir_entry_2 *)old; - struct dir_iterate_data *idata = (struct dir_iterate_data *)priv_data; - - objectid = dirent->inode + INO_OFFSET; - if (...