similar to: Checking if a directory is empty using File

Displaying 20 results from an estimated 3000 matches similar to: "Checking if a directory is empty using File"

2007 May 30
4
aaf and dynamic attrs: a bug?
Hi! I faced some issue while using it for dynamic attrs indexing/search. Maybe I made something wrong. Here is test method. Everything works just fine until last line http://pastie.caboo.se/66274 . Tested on both stable and trunk of aaf and ferret 0.11.4. the short version of code below: Contact.acts_as_ferret :fields => [ :first_name ] assert
2007 Oct 01
2
[ win32utils-Bugs-14360 ] Bad interaction between win32-file-stat and FileUtils
Bugs item #14360, was opened at 2007-10-01 15:00 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=14360&group_id=85 Category: win32-file-stat Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: Bad interaction between win32-file-stat and FileUtils Initial Comment: Ruby
2007 Mar 09
10
Add the ability to ''eval'' ruby code in exec type?
Hi, Anyone think this is a good idea? I have found that there are some exec tasks that I am making that just shell out to ruby to do a one / two line script in the exec line, was thinking it would be nice to have an option for exec to tell it to just eval ruby code passed to it, e.g. exec { ''eval: code to evaluate'':, ... } I know Lane wants users to turn execs into new
2005 Jul 28
1
[LLVMdev] [patch] gccld not properly constructing paths when checking for bytecode
I was getting some weird errors from gccld and traced it to path construction in isBytecodeLPath. If the path doesn't end with a /, then Path just tries to stick filenames onto it, which is not so good. It would be more efficient to just add a "/" to the path once, I guess. Also, I had to touch lib/System/Path.cpp to get my changes to Path.inc noticed; it seems the build system
2006 Jun 14
2
Simple FileUtils question
Hi, I have a quick question. I am trying to create folders dinamically using FileUtils.mkdir, the problem is that if the folder already exist it gives me an error. Does anyone know if there are any options to mkdir that would let me overwrite the already existing directory? I just need to create a folder with the same name everytime. Any other solution you might suggest? Thanks. -- Posted
2006 Jan 05
4
testing file uploads
Hi all, I was wondering about the class used when rails receives file uploads. Sometimes it appears to be a File, and other times it is a StringIO. Also it has methods such as original_filename that don''t appear to belong to either of these classes. I ask because I''m trying to work out how to test my fil upload related models and controllers. Is there some standardised way of
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
I am taking my first steps in textual analysis with R. I have pdf files consisting of company reports for several years (1 file corresponds to 1 company and 1 year). My idea is to start by transforming all my pdf files into txt files for further treatment and analysis (this will allow me to group the files by company or by year, depending on the future analysis to be performed). I do not have
2014 Mar 05
1
DFS
Robert Gurdon robert.gurdon at gmail.com 12:49 (0 perce) c?mzett: samba Hai, I would like to set up a DFS with this configuration: I have 3 Samba4 servers (4.1.4). 2 of them should work as a DFS "client" the third one will be the DFS stotage (actualy this servers has the required amount of space). So, i configured all shares on DC3 and point to those shares on DC1 and DC2. Everything
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
convertpdf2txt <- function(dirpath){ files <- list.files(dirpath, pattern = "Consoli.*\\.pdf$", full.names = TRUE) files <- chartr("\\", "/", files) x <- lapply(files, function(x){ pdftools::pdf_text(x) %>% paste0(collapse = " ") %>% stringr::str_squish() }) new_names <-
2006 May 30
3
expected, got Fixnum problem.
Hi, I was wondering if anybody knew what ''<some type> expected, got Fixnum'' means? My code looks like the following: begin anevent = Event.new anevent.title = params["event"]["title"] anevent = session[:user_id] com = Community.find(params[:id]) com.events << anevent rescue Exception => exc ... end But I get an
2013 Dec 09
2
[PATCH] sysprep: allow to specify globbing for --delete
Adapt the globbing part from the old --remote-path work previously proposed for sysprep [1], allowing --delete to perform globbing when deleting paths. [1] https://www.redhat.com/archives/libguestfs/2013-October/msg00045.html --- sysprep/sysprep_operation_delete.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysprep/sysprep_operation_delete.ml
2007 Jun 24
4
Resetting ferret index before test runs
I need to reset the ferret index between test runs. It seems like there are a few ways to reset the ferret index. * Deleting the index directory -- is this really bad form? * calling rebuild_index * (any others?) What would y''all recommend? (Sorry, I''m from Texas) Preferably, I''d like a way to reset the index that I can integrate into a selenium test. -David
2007 Oct 08
1
Getting an actual system error
Heya all, I don''t think I''ve been paying attention. When a Windows API function fails, I could have been doing this: raise SystemCallError(GetLastError()) Instead of this: # Where ''Error'' is nested under the current class. raise Error, get_last_error I''m not sure how big of a deal this is in practice, however, or if it''s even preferred for
2007 Oct 09
5
Playing with ReadFileScatter()
Hi all, Looking at the IO.readlines source in io.c, it looks to me like they grab 8k chunks, split on the input record separator, and buffer accordingly. Since it looks like ReadFileScatter() does some of that work automatically (in page file sized chunks), I thought I''d give it a try. Here''s what I''ve got, but it doesn''t work. I have an incorrect parameter
2006 May 10
2
getting absolute paths on files on filesystem.
Hi, I''d like to be able to store the absolute path for a file so that I could use <img src = "...." > and give it the path to the file I''d like to display. I was wondering if there is an easy way to do this and whether there are any issues with this on Windows. thanks in advance. -------------- next part -------------- An HTML attachment was scrubbed... URL:
2016 Jun 23
2
Samba pid in uninterruptible state
Greetings, I recently upgraded Samba on an Ubuntu 14.04.2 server from version 4.1.9 to 4.2.3. Upon rebooting Samba process goes into a running state then after a short time it will go into an uninterruptible state. If I check the log.samba, it appears that it is attempting to start, then hangs at the following: [2016/06/23 15:16:00.329503, 3] ../source4/param/share.c:124(share_register)
2002 Oct 09
3
directories creation troubles
Hi ! I've just finished setting up a samba 2.2.6pre2 installation on a SGI running IRIX 6.5.16. I've discovered that logging on a win2000 client, if I create a new file on a test share everything works but when I try to create a new directory I get the following error on win: Impossible to create the folder "New Folder" Impossible to find the specified file. Increasing the log
2002 Nov 05
1
rsync -- batch mode. bug?
Hi all, I am using the following rsync command. rsync --write-batch -av --stats `cat $1` -e ssh user@host:/dirPath/ This is what is happening. 1. I have a list of , say 10 files. 2. On first attempt, all files are successfully rsynced. 3. When, I repeat the same command again, the files are MISSING on the destination machine. 4. From the log, it looks like the files are NOT being
2014 Dec 16
2
Samba "%G" replacement not working in "Logon script" ?
Dear all, I experience now a strange bug with Samba 4.1.11 : When I define a fixed-name as logon script in smb.conf, it works : logon script = employee.bat But if I try either %g.bat or %G.bat, or even "%G.bat", it doesn't work : * logon script = %g.bat * logon script = %G.bat * logon script = "%G.bat" In the logs, there was a message showing that Samba was
2018 Jun 14
2
No write access on new shares until smbd is restarted
Using the latest SerNet 4.8.1 build, I'm seeing users being unable to write into newly created shares until smbd is restarted. Here's the relevant log part: [2018/06/14 16:04:29.229329, 5] ../source3/smbd/filename.c:662(unix_convert) unix_convert begin: name = New folder, dirpath = , start = New folder [2018/06/14 16:04:29.229375, 5] ../source3/smbd/vfs.c:1458(check_reduced_name)