File Lock - How to lock and unlock a file ? Can we do that for an FTP File?
Hi All,
I like to retrieve a file from the FTP server using Apache Commons Net libraries.
for example if the file size is 20MB. When the file is in the progress of copying or transferring from the FTP server i need to lock the local file which is in our local directory so that no other process will use the same local file which is in the process of copying otherwise partially copied files will be used by another process.
the file should be locked when it was in the progress of copying from the server. I have an automatic process which will access file objects at certain time and try to process the files.
I like to know the simplest and easiest way to lock and unlock a file object locally which is trying to copy a file from the FTP server which is of huge size.
And also i like to know how to lock and unlock a file in general?
Thanks,
J.Kathir
we can set it read only only when it complete finishing the writing.
can we able to make the file as read-only while transferring data to file.
How to achieve it ? pls give me some sample code
Similar Messages
-
HT201441 i find a iPad mini i dot-no who.s owner but this iPad mini is lock how remove lock
i find a iPad mini i dot-no who.s owner but this iPad mini is lock how remove lock
You can't, and Apple won't unlock that device for you; the activation lock is an anti-theft measure. Take it to the police, or if you found it in a facility, the people running the facility.
(126850) -
I installed elements 12 on a Win 8.1 computer and moved all my photos from my old XP machine. I updated to elements 12.1. Now, many/most of my photos will not open because I do not have "permission" to open the files. How do I fix this so I can work with MY photos?
Yes, the Old Master file has a folder for each year where I find all photos from that specific year. I am attaching a screen shot of the file.
In the meantime i have managed to download all photos (it did not download any video files though in mpg, avi, 3gp, m4v,mp4 and mov format) to a new iphoto library. Unfortunately the photos are quite mixed and often doubled up. I ma considering to purchase iphoto library which checks all duplicates in iphoto. this will save me a lot of time. What do you think? -
This article contains the only thing that worked for me. I also had to sign out of iCloud and uninstall it. Then I had to delete all files and folders from all of those applications that were under Program Files, Program Files x86, Program Data and Users. My iPhone 4 will now sync with iTunes both in its USB-connected mini dock and over Wi-Fi. It's unfortunate (negligent programming on the part of Apple?) that the upgrade to iTunes 11 did not remove all of those files as part of the upgrade process.
I am having the same issue....Same address for years - same as USPS - I tried 5 times (3 macs and 2 iPhones) and now i have 5 CHARGES for 1.00 each on my credit card. I took the credit card info off so they don't charge me anymore. How can they charge me yet still not allow me to download free updates and say I have an invalid address? I'm sure I will spend weeks or months trying to get a credit out of these incompetent idiots.
-
Am trying to download itunes as it has previously deleted during an update, and it comes up during the installation that there is a file error with my resources
That's perfect, thanks.
error writing to file: C:\Program
files\ i tunes\ i tunes.Resources\ja.lproj\AppleTVStream
itxib. Verify that you have access to that directory
That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
XP instructions in the following document: How to perform disk error checking in Windows XP
Vista instructions in the following document: Check your hard disk for errors
Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards? -
MY APPLE ID EMAIL ACCOUNT WAS STOLEN BY SOMEONE, AND I NOW I CAN NOT FIX THAT. SO I OPEN A NEW GAMIL HOW CAN I CHANGE MY APPLE ID INTO A NEW EMAIL ADRESS? THANKS.
If you are going to change your AppleID login you will need to log out and back in on all your devices. Turn off 'Find My iPhone/iMac/iPod' first or you will find yourself unable to sign out and be stuck.
-
I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents? I am planning to transition to a Mac so using the iCloud seems to make the most sence.
No, it is not a backup method at all. If you delete a sync'd file on any device, you delete it permanently from iCloud. That by its very essence is not a backup solution therefore. A backup solution does not automatically and simultaneiously delete the file everywhere when it is deleted from the original source.
iCloud is strictly a syncronization tool for using files on multiple internet connected devices. -
I'v downloaded a tv series,paid for it, its in my itunes but with exclamation marks next to it, every time it tries to download the series it says "part of the file seems to be corrupted" and tells me to redownload it.Tried that 8 times and it comes up the same. What do I do?
Clear the contents of ...iTunes\iTunes Media\Download and try one more time.
If the problem recurs use the "report a problem" links in your account history and explain what has happened so far. There may be a problem with the source rather than your download of it.
tt2 -
iPhone 4S. Swipe to unlock wont work can only swipe up for control pannel and camera but no buttons will work cant even turn off and on as it wont work. cannot restore iphone either as it wont let me.
Hey Angus97,
These are the recommended troubleshooting steps to take when you are unable to Slide to Unlock:
If the device is unresponsive or if certain controls aren't working as expected, restart your device.
If the device remains unresponsive or does not turn on (or power on), reset your device.
If the above steps do not resolve the issue, or the if the screen remains black or shows a persistent Apple logo, try restoring with iTunes:
Connect the device to your computer and open iTunes.
If the device appears in iTunes, select and click Restore on the Summary pane. Learn more about restoring iOS software.
If the device doesn't appear in iTunes, try to force the device into recovery mode, and then restore it.
If the above steps do not resolve the issue, contact Apple.
from: iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
Welcome to Apple Support Communities!
All the best,
Delgadoh -
i bought a new macbook pro ,and i wnt to upgrade it to lion can i do that for free, if so how?, i bought a new macbook pro ,and i wnt to upgrade it to lion can i do that for free, if so how?
Apple has information at the link below.
http://www.apple.com/macosx/uptodate/
Stedman -
Problem with gettigs Timestamp for a FTP files
Hi All,
I try to get a files from FTP location to my location Pc using enterprisedt.net.ftp.FTPCient. I need to get the fides from FTP location and copy that files in local with original timestamp.
ex.
client.get(localfilenamepath,remotefilename);
Date ftpdate= client .modtime(remoteFilename);
after coping file to my local pc,i need to set the original timestamp of the remote file.
localfile.setLastModified(ftpdate.getTime);
in that case,i cannot get the original time but the date will updated correct.
appreciate if anyone give me a solution.
Thanks
Message was edited by:
mayenAfter setting lastmodified time,the date only updated with original but the time is bit differnt (i.e) its updated with some time different
for ex,
FTP File shows>> 30/05/2006 1:39PM
after coping in local file>> 30/05/2006 5:39 AM.
The original ftp file's time is update with different one.
How do i set the time also the same one.
Message was edited by:
mayen
Message was edited by:
mayen -
i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME
i have a Mac OSX version 10.75 with just one Thunderbolt port. and it has been my Thunderbolt port to connect with Blackmagic wear my intensity. and I no longer can use the port for mini-DVI adapter to connect with me. I do not want to ask any other way for me to use to use my monitor. I monitor LG FLATRON E2041 brand .. PLEASE Helpp ME
-
I have two iphone , 4 and 5s
I have only one apple id
I upgeraded 5s to ios 8 but cleared all contacts of iphone 4 and
I have backup on icloud for 4 and 5s but I can’t recovery contacts for iphone 4
After restore with backup on icloud , A moment seen iphone 4 contacts and contacts 5S immediately replaced!
Pleas help me
TanksYou have to follow the process outlined here to recover contacts from an iCloud backup: Recovering deleted iCloud contacts from an iCloud backup.. Otherwise, as you have noticed, the recovered contacts are overwritten when your device reconnects to iCloud.
-
Just updated to ios6, tried to update an app and now its stuck "waiting". Like that for 24 hours, mail is OK, web browsing OK but cannot unblock the apps thing. any ideas?
Try update using iTune (Check for Update; see bottom right)
http://i1224.photobucket.com/albums/ee374/Diavonex/Album%201/52351097ee11e908a25 cdaa4c9483fdd_zpsbaeae828.jpg -
my ipod doesn't turn on and doesn't charge at all.what will i do?can i replace that for free?i just used it for 7 months..hope you can help me
See http://support.apple.com/kb/TS3281. I had the same problem, but solved it by holding down the home button and the on/off button for 10 seconds. If you are lucky, that will work for you as well!
Maybe you are looking for
-
Yesterday, 9/26, at around 12pm I was trying to access my account to pay my Verizon bill for my internet and TV service. Through multiple attempts I was getting the prompt that my account could not be accessed and so I called technical support and wa
-
Hello, I had a hard drive crash on a Lenove U400, i changed the hard disk drive. I then reinstall Windwos 7 Home prmium 64 on the laptop. A standard windows 7 home. The I installed the AMD Catalyst driver, from the lenovo driver web page. AMD Graphi
-
Which services in the Server app use PostgreSQL?
I want to use Postgres.app for PostgreSQL and move my databases currently on the Apple installed instance. The documentation states that it works best if there is only one active instance of PostgreSQL. I currently use the latest version of the Mave
-
While working on a project I've ran across a pretty nasty bug with the Date class in flash. I've tested this in 8.0 Professional and the issue also exists in 9.0 Alpha Release. var d1:Date = new Date(2006, 12, 21); var d2:Date = new Date(2007, 1, 31)
-
Since the forums have been reorganized (yeah, I know its been a while). I never fail to be confused when I try to use them. For instance: 1) At the top of the list of questions for adobe Bridge general discussion, I see the Heading: "Trending Questi